YC-Chen commited on
Commit
f8df1bb
·
verified ·
1 Parent(s): f60c1d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -21
app.py CHANGED
@@ -95,27 +95,7 @@ def refusal_condition(query):
95
  with gr.Blocks() as demo:
96
  gr.Markdown(DESCRIPTION)
97
 
98
- chatbot = gr.Chatbot()
99
- with gr.Row():
100
- msg = gr.Textbox(
101
- container=False,
102
- show_label=False,
103
- placeholder='Type a message...',
104
- scale=10,
105
- )
106
- submit_button = gr.Button('Submit',
107
- variant='primary',
108
- scale=1,
109
- min_width=0)
110
-
111
- with gr.Row():
112
- retry_button = gr.Button('🔄 Retry', variant='secondary')
113
- undo_button = gr.Button('↩️ Undo', variant='secondary')
114
- clear = gr.Button('🗑️ Clear', variant='secondary')
115
-
116
- saved_input = gr.State()
117
-
118
- with gr.Accordion(label='Advanced options', open=False):
119
  system_prompt = gr.Textbox(label='System prompt',
120
  value=DEFAULT_SYSTEM_PROMPT,
121
  lines=6)
@@ -141,6 +121,28 @@ with gr.Blocks() as demo:
141
  value=0.01,
142
  )
143
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
 
145
  def user(user_message, history):
146
  return "", history + [[user_message, None]]
 
95
  with gr.Blocks() as demo:
96
  gr.Markdown(DESCRIPTION)
97
 
98
+ with gr.Accordion(label='Advanced options', open=True):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  system_prompt = gr.Textbox(label='System prompt',
100
  value=DEFAULT_SYSTEM_PROMPT,
101
  lines=6)
 
121
  value=0.01,
122
  )
123
 
124
+ chatbot = gr.Chatbot()
125
+ with gr.Row():
126
+ msg = gr.Textbox(
127
+ container=False,
128
+ show_label=False,
129
+ placeholder='Type a message...',
130
+ scale=10,
131
+ )
132
+ submit_button = gr.Button('Submit',
133
+ variant='primary',
134
+ scale=1,
135
+ min_width=0)
136
+
137
+ with gr.Row():
138
+ retry_button = gr.Button('🔄 Retry', variant='secondary')
139
+ undo_button = gr.Button('↩️ Undo', variant='secondary')
140
+ clear = gr.Button('🗑️ Clear', variant='secondary')
141
+
142
+ saved_input = gr.State()
143
+
144
+
145
+
146
 
147
  def user(user_message, history):
148
  return "", history + [[user_message, None]]