chansung commited on
Commit
10d8562
·
1 Parent(s): 9aac618

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -9
app.py CHANGED
@@ -162,11 +162,9 @@ with gr.Blocks(css=PARENT_BLOCK_CSS) as demo:
162
 
163
 
164
  send_event = send_prompt_btn.click(
165
- chat_batch if batch_enabled else chat_stream,
166
  [context_txtbox, instruction_txtbox, state_chatbot],
167
  [state_chatbot, chatbot, context_txtbox],
168
- batch=batch_enabled,
169
- max_batch_size=args.batch_size,
170
  )
171
  reset_event = send_prompt_btn.click(
172
  reset_textbox,
@@ -175,11 +173,9 @@ with gr.Blocks(css=PARENT_BLOCK_CSS) as demo:
175
  )
176
 
177
  continue_event = continue_btn.click(
178
- chat_batch if batch_enabled else chat_stream,
179
  [context_txtbox, continue_txtbox, state_chatbot],
180
  [state_chatbot, chatbot, context_txtbox],
181
- batch=batch_enabled,
182
- max_batch_size=args.batch_size,
183
  )
184
  reset_continue_event = continue_btn.click(
185
  reset_textbox,
@@ -188,11 +184,9 @@ with gr.Blocks(css=PARENT_BLOCK_CSS) as demo:
188
  )
189
 
190
  summarize_event = summarize_btn.click(
191
- chat_batch if batch_enabled else chat_stream,
192
  [context_txtbox, summrize_txtbox, state_chatbot],
193
  [state_chatbot, chatbot, context_txtbox],
194
- batch=batch_enabled,
195
- max_batch_size=args.batch_size,
196
  )
197
  summarize_reset_event = summarize_btn.click(
198
  reset_textbox,
 
162
 
163
 
164
  send_event = send_prompt_btn.click(
165
+ chat_stream,
166
  [context_txtbox, instruction_txtbox, state_chatbot],
167
  [state_chatbot, chatbot, context_txtbox],
 
 
168
  )
169
  reset_event = send_prompt_btn.click(
170
  reset_textbox,
 
173
  )
174
 
175
  continue_event = continue_btn.click(
176
+ chat_stream,
177
  [context_txtbox, continue_txtbox, state_chatbot],
178
  [state_chatbot, chatbot, context_txtbox],
 
 
179
  )
180
  reset_continue_event = continue_btn.click(
181
  reset_textbox,
 
184
  )
185
 
186
  summarize_event = summarize_btn.click(
187
+ chat_stream,
188
  [context_txtbox, summrize_txtbox, state_chatbot],
189
  [state_chatbot, chatbot, context_txtbox],
 
 
190
  )
191
  summarize_reset_event = summarize_btn.click(
192
  reset_textbox,