5to9 commited on
Commit
0336e25
·
1 Parent(s): 18fc5ad

0.32 append bot message

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -180,10 +180,9 @@ def generate_both(system_prompt, input_text, chatbot_a, chatbot_b, max_new_token
180
  def clear():
181
  return [], []
182
 
183
- def reveal_bot(choice):
184
- logging.debug(choice)
185
- chatbot_a = "Hello A"
186
- chatbot_b = "Hello B"
187
  return chatbot_a, chatbot_b
188
 
189
  arena_notes = """## Important Notes:
@@ -213,7 +212,7 @@ with gr.Blocks() as demo:
213
  top_p = gr.Slider(minimum=0.0, maximum=1.0, value=1.0, label="Top-p", step=0.01)
214
  repetition_penalty = gr.Slider(minimum=0.1, maximum=2.0, value=1.1, label="Repetition Penalty", step=0.1)
215
 
216
- better_bot.select(reveal_bot, better_bot) #fckp outputs=[chatbot_a, chatbot_b]
217
  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])
218
  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])
219
  clear_btn.click(clear, outputs=[chatbot_a, chatbot_b])
 
180
  def clear():
181
  return [], []
182
 
183
+ def reveal_bot(chatbot_a, chatbot_b):
184
+ chatbot_a.append("I am Bot Arno")
185
+ chatbot_b.append("I am Bot Bernd")
 
186
  return chatbot_a, chatbot_b
187
 
188
  arena_notes = """## Important Notes:
 
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(reveal_bot, inputs=[chatbot_a, chatbot_b], outputs=[chatbot_a, chatbot_b]) #fckp 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])