Spaces:
Sleeping
Sleeping
vtrv.vls
commited on
Commit
·
4d88e85
1
Parent(s):
de62f09
Functionality rework
Browse files
app.py
CHANGED
|
@@ -35,7 +35,7 @@ def model_gen(
|
|
| 35 |
if len(content) == 0:
|
| 36 |
return '', []
|
| 37 |
|
| 38 |
-
chat_history = chat_history[-1] if no_context and len(chat_history)
|
| 39 |
|
| 40 |
return model_response(
|
| 41 |
content,
|
|
@@ -91,7 +91,7 @@ def tab_online_arena():
|
|
| 91 |
global S3_SESSION, GEN_LIB, MODEL_LIB, INIT_MODELS, CURRENT_MODELS
|
| 92 |
with gradio.Row():
|
| 93 |
with gradio.Column():
|
| 94 |
-
model_left = gradio.Dropdown(["TINYLLAMA", "QWEN2INS1B", "RUBASE"], value="
|
| 95 |
chatbot_left = gradio.Chatbot()
|
| 96 |
with gradio.Column():
|
| 97 |
model_right = gradio.Dropdown(["TINYLLAMA", "QWEN2INS1B", "RUBASE"], value= "RUBASE", interactive=True, multiselect=False, label="Right model")
|
|
|
|
| 35 |
if len(content) == 0:
|
| 36 |
return '', []
|
| 37 |
|
| 38 |
+
chat_history = [chat_history[-1]] if no_context and len(chat_history)>=1 else chat_history
|
| 39 |
|
| 40 |
return model_response(
|
| 41 |
content,
|
|
|
|
| 91 |
global S3_SESSION, GEN_LIB, MODEL_LIB, INIT_MODELS, CURRENT_MODELS
|
| 92 |
with gradio.Row():
|
| 93 |
with gradio.Column():
|
| 94 |
+
model_left = gradio.Dropdown(["TINYLLAMA", "QWEN2INS1B", "RUBASE"], value="QWEN2INS1B", interactive=True, multiselect=False, label="Left model")
|
| 95 |
chatbot_left = gradio.Chatbot()
|
| 96 |
with gradio.Column():
|
| 97 |
model_right = gradio.Dropdown(["TINYLLAMA", "QWEN2INS1B", "RUBASE"], value= "RUBASE", interactive=True, multiselect=False, label="Right model")
|
utils.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
import requests
|
| 2 |
import json
|
| 3 |
import os
|
| 4 |
-
import boto3
|
| 5 |
from datetime import datetime
|
| 6 |
from copy import copy
|
| 7 |
|
|
|
|
| 1 |
import requests
|
| 2 |
import json
|
| 3 |
import os
|
|
|
|
| 4 |
from datetime import datetime
|
| 5 |
from copy import copy
|
| 6 |
|