project-baize commited on
Commit
16e8683
1 Parent(s): a9302e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -119,7 +119,8 @@ with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
119
  ).style(container=False)
120
  with gr.Column(min_width=70, scale=1):
121
  submitBtn = gr.Button("Send")
122
-
 
123
  with gr.Row(scale=1):
124
  emptyBtn = gr.Button(
125
  "🧹 New Conversation",
@@ -156,7 +157,7 @@ with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
156
  )
157
  max_context_length_tokens = gr.Slider(
158
  minimum=0,
159
- maximum=2048,
160
  value=2048,
161
  step=128,
162
  interactive=True,
@@ -221,12 +222,12 @@ with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
221
  [chatbot, history, status_display],
222
  show_progress=True,
223
  )
224
- #cancelBtn.click(
225
- # cancel_outputing, [], [status_display],
226
- # cancels=[
227
- # predict_event1,predict_event2,predict_event3
228
- # ]
229
- #)
230
  demo.title = "Baize"
231
 
232
  demo.queue(concurrency_count=1).launch()
 
119
  ).style(container=False)
120
  with gr.Column(min_width=70, scale=1):
121
  submitBtn = gr.Button("Send")
122
+ with gr.Column(min_width=70, scale=1):
123
+ cancelBtn = gr.Button("Stop")
124
  with gr.Row(scale=1):
125
  emptyBtn = gr.Button(
126
  "🧹 New Conversation",
 
157
  )
158
  max_context_length_tokens = gr.Slider(
159
  minimum=0,
160
+ maximum=4096,
161
  value=2048,
162
  step=128,
163
  interactive=True,
 
222
  [chatbot, history, status_display],
223
  show_progress=True,
224
  )
225
+ cancelBtn.click(
226
+ cancel_outputing, [], [status_display],
227
+ cancels=[
228
+ predict_event1,predict_event2,predict_event3
229
+ ]
230
+ )
231
  demo.title = "Baize"
232
 
233
  demo.queue(concurrency_count=1).launch()