vtrv.vls commited on
Commit
8b9a418
·
1 Parent(s): 079abd1
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -44,6 +44,8 @@ def model_gen(content, model_type: str, chat_history):
44
  print(MODEL_LIB[model_type])
45
  return gen(content, chat_history)
46
 
 
 
47
  MODEL_LIB = {'RUBASE': giga_gen, 'TINYLLAMA': tiny_gen, 'QWEN2INS1B': qwen_gen}
48
 
49
  def tab_arena():
@@ -64,12 +66,7 @@ def tab_arena():
64
  msg = gradio.Textbox()
65
  clear = gradio.ClearButton([msg, chatbot_left, chatbot_right])
66
 
67
- # def respond(message, chat_history):
68
- # bot_message = random.choice(["How are you?", "I love you", "I'm very hungry"])
69
- # chat_history.append((message, bot_message))
70
- # time.sleep(2)
71
- # return "", chat_history
72
-
73
  msg.submit(model_gen, [msg, model_left, chatbot_left], [msg, chatbot_left])
74
  msg.submit(model_gen, [msg, model_right, chatbot_right], [msg, chatbot_right])
75
 
 
44
  print(MODEL_LIB[model_type])
45
  return gen(content, chat_history)
46
 
47
+ def reset()
48
+
49
  MODEL_LIB = {'RUBASE': giga_gen, 'TINYLLAMA': tiny_gen, 'QWEN2INS1B': qwen_gen}
50
 
51
  def tab_arena():
 
66
  msg = gradio.Textbox()
67
  clear = gradio.ClearButton([msg, chatbot_left, chatbot_right])
68
 
69
+ chatbot_left.change(lambda: clear.click(lambda: None), None)
 
 
 
 
 
70
  msg.submit(model_gen, [msg, model_left, chatbot_left], [msg, chatbot_left])
71
  msg.submit(model_gen, [msg, model_right, chatbot_right], [msg, chatbot_right])
72