vtrv.vls commited on
Commit
99cc45f
·
1 Parent(s): 7028ba1
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -36,13 +36,16 @@ def qwen_gen(content, chat_history):
36
  send_to_s3(res, f'protobench/tiny_{str(datetime.now()).replace(" ", "_")}.json', S3_SESSION)
37
  return '', chat_history
38
 
 
39
 
40
  def tab_arena():
41
  with gradio.Row():
42
  with gradio.Column():
43
  chatbot_left = gradio.Chatbot()
 
44
  with gradio.Column():
45
  chatbot_right = gradio.Chatbot()
 
46
 
47
  with gradio.Row():
48
  gradio.Button('Both Good')
@@ -59,8 +62,8 @@ def tab_arena():
59
  # time.sleep(2)
60
  # return "", chat_history
61
 
62
- msg.submit(giga_gen, [msg, chatbot_left], [msg, chatbot_left])
63
- msg.submit(qwen_gen, [msg, chatbot_right], [msg, chatbot_right])
64
 
65
  # with gradio.Column():
66
  # gradio.ChatInterface(
 
36
  send_to_s3(res, f'protobench/tiny_{str(datetime.now()).replace(" ", "_")}.json', S3_SESSION)
37
  return '', chat_history
38
 
39
+ MODEL_LIB = {'RUBASE': giga_gen, 'TINYLLAMA': tiny_gen, 'QWEN2INS1B': qwen_gen}
40
 
41
  def tab_arena():
42
  with gradio.Row():
43
  with gradio.Column():
44
  chatbot_left = gradio.Chatbot()
45
+ left_model = gradio.Dropdown(["TINYLLAMA", "QWEN2INS1B", "RUBASE"], value="RUBASE", multiselect=False, label="Left model")
46
  with gradio.Column():
47
  chatbot_right = gradio.Chatbot()
48
+ right_model = gradio.Dropdown(["TINYLLAMA", "QWEN2INS1B", "RUBASE"], value="TINYLLAMA", multiselect=False, label="Left model")
49
 
50
  with gradio.Row():
51
  gradio.Button('Both Good')
 
62
  # time.sleep(2)
63
  # return "", chat_history
64
 
65
+ msg.submit(MODEL_LIB[left_model], [msg, chatbot_left], [msg, chatbot_left])
66
+ msg.submit(MODEL_LIB[right_model], [msg, chatbot_right], [msg, chatbot_right])
67
 
68
  # with gradio.Column():
69
  # gradio.ChatInterface(