5to9 commited on
Commit
dbacf8c
·
1 Parent(s): a3d3acb

0.28 changing select funct

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -183,7 +183,7 @@ def clear():
183
  def show_bot():
184
  chatbot_a = "Hello A"
185
  chatbot_b = "Hello B"
186
- return gr.update(label=chatbot_a), gr.update(label=chatbot_b)
187
 
188
  arena_notes = """## Important Notes:
189
  - Sometimes an error may occur when generating the response, in this case, please try again.
@@ -212,7 +212,7 @@ with gr.Blocks() as demo:
212
  top_p = gr.Slider(minimum=0.0, maximum=1.0, value=1.0, label="Top-p", step=0.01)
213
  repetition_penalty = gr.Slider(minimum=0.1, maximum=2.0, value=1.1, label="Repetition Penalty", step=0.1)
214
 
215
- better_bot.select(outputs=[chatbot_a, chatbot_b])
216
  input_text.submit(generate_both, inputs=[system_prompt, input_text, chatbot_a, chatbot_b, max_new_tokens, temperature, top_p, repetition_penalty], outputs=[chatbot_a, chatbot_b])
217
  submit_btn.click(generate_both, inputs=[system_prompt, input_text, chatbot_a, chatbot_b, max_new_tokens, temperature, top_p, repetition_penalty], outputs=[chatbot_a, chatbot_b])
218
  clear_btn.click(clear, outputs=[chatbot_a, chatbot_b])
 
183
  def show_bot():
184
  chatbot_a = "Hello A"
185
  chatbot_b = "Hello B"
186
+ return chatbot_a, chatbot_b
187
 
188
  arena_notes = """## Important Notes:
189
  - Sometimes an error may occur when generating the response, in this case, please try again.
 
212
  top_p = gr.Slider(minimum=0.0, maximum=1.0, value=1.0, label="Top-p", step=0.01)
213
  repetition_penalty = gr.Slider(minimum=0.1, maximum=2.0, value=1.1, label="Repetition Penalty", step=0.1)
214
 
215
+ better_bot.select(outputs=[chatbot_a, chatbot_b]) #fckp
216
  input_text.submit(generate_both, inputs=[system_prompt, input_text, chatbot_a, chatbot_b, max_new_tokens, temperature, top_p, repetition_penalty], outputs=[chatbot_a, chatbot_b])
217
  submit_btn.click(generate_both, inputs=[system_prompt, input_text, chatbot_a, chatbot_b, max_new_tokens, temperature, top_p, repetition_penalty], outputs=[chatbot_a, chatbot_b])
218
  clear_btn.click(clear, outputs=[chatbot_a, chatbot_b])