Dagfinn1962 commited on
Commit
c62a6c7
1 Parent(s): 9fa7c39

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -21
app.py CHANGED
@@ -145,36 +145,35 @@ with gr.Blocks(theme='HaleyCH/HaleyCH_Theme') as demo:
145
  elem_classes=["disclaimer"],
146
  )
147
  with gr.Row():
148
- gr.Markdown(
149
- "[Privacy policy](https://gist.github.com/samhavens/c29c68cdcd420a9aa0202d0839876dac)",
150
- elem_classes=["disclaimer"],
151
- )
152
-
153
- submit_event = msg.submit(
154
- fn=conversation.user_turn,
155
- inputs=[msg],
156
- outputs=[msg, chatbot],
157
- queue=False,
158
- ).then(
159
- fn=conversation.bot_turn,
160
- inputs=[system, chatbot, openai_key],
161
- outputs=[chatbot],
162
- keep_in_queue=True, # Change `queue=True` to `keep_in_queue=True`
163
- )
164
 
165
- submit_click_event = submit.click(
 
 
 
 
 
 
 
 
 
 
 
166
  fn=conversation.user_turn,
167
  inputs=[msg],
168
  outputs=[msg, chatbot],
169
  queue=False,
170
- ).then(
171
  fn=conversation.bot_turn,
172
  inputs=[system, chatbot, openai_key],
173
  outputs=[chatbot],
174
- keep_in_queue=True, # Change `queue=True` to `keep_in_queue=True`
175
- )
176
 
177
- stop.click(...)
178
 
179
  fn=None,
180
  inputs=None,
 
145
  elem_classes=["disclaimer"],
146
  )
147
  with gr.Row():
148
+ gr.Markdown(
149
+ "[Privacy policy](https://gist.github.com/samhavens/c29c68cdcd420a9aa0202d0839876dac)",
150
+ elem_classes=["disclaimer"],
151
+ )
 
 
 
 
 
 
 
 
 
 
 
 
152
 
153
+ submit_event = msg.submit(
154
+ fn=conversation.user_turn,
155
+ inputs=[msg],
156
+ outputs=[msg, chatbot],
157
+ queue=False,
158
+ ).then(
159
+ fn=conversation.bot_turn,
160
+ inputs=[system, chatbot, openai_key],
161
+ outputs=[chatbot],
162
+ queue=True, # Change `queue=True` to `keep_in_queue=True`
163
+ )
164
+ submit_click_event = submit.click(
165
  fn=conversation.user_turn,
166
  inputs=[msg],
167
  outputs=[msg, chatbot],
168
  queue=False,
169
+ ).then(
170
  fn=conversation.bot_turn,
171
  inputs=[system, chatbot, openai_key],
172
  outputs=[chatbot],
173
+ queue=True, # Change `queue=True` to `keep_in_queue=True`
174
+ )
175
 
176
+ stop.click(...)
177
 
178
  fn=None,
179
  inputs=None,