Spaces:
Build error
Build error
vtrv.vls commited on
Commit ·
fd156db
1
Parent(s): a1b571e
Async requests
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ MODEL_LIB = {'TINYLLAMA': get_tinyllama, "QWEN2INS1B": get_qwen2ins1b, "RUBASE":
|
|
| 20 |
GEN_LIB = {'TINYLLAMA': response_tinyllama, "QWEN2INS1B": response_qwen2ins1b, "RUBASE": response_gigachat}
|
| 21 |
MODEL_LIST = ["TINYLLAMA", "QWEN2INS1B", "RUBASE"]
|
| 22 |
|
| 23 |
-
def model_gen(
|
| 24 |
content,
|
| 25 |
chat_history,
|
| 26 |
model_name: str,
|
|
@@ -49,7 +49,7 @@ def model_gen(
|
|
| 49 |
{"top_p": top_p, "temperature": temp, "max_tokens": max_tokens}
|
| 50 |
)
|
| 51 |
|
| 52 |
-
def model_regen(
|
| 53 |
content,
|
| 54 |
chat_history,
|
| 55 |
model_name: str,
|
|
@@ -227,7 +227,7 @@ def tab_offline_arena():
|
|
| 227 |
def build_demo():
|
| 228 |
# global original_dfs, available_models, gpt4t_dfs, haiku_dfs, llama_dfs
|
| 229 |
|
| 230 |
-
with gradio.Blocks(theme=gradio.themes.Base(), css=css, js=js_light) as demo:
|
| 231 |
# gradio.HTML(BANNER, elem_id="banner")
|
| 232 |
# gradio.Markdown(HEADER_MD.replace("{model_num}", str(len(original_dfs["-1"]))), elem_classes="markdown-text")
|
| 233 |
|
|
|
|
| 20 |
GEN_LIB = {'TINYLLAMA': response_tinyllama, "QWEN2INS1B": response_qwen2ins1b, "RUBASE": response_gigachat}
|
| 21 |
MODEL_LIST = ["TINYLLAMA", "QWEN2INS1B", "RUBASE"]
|
| 22 |
|
| 23 |
+
async def model_gen(
|
| 24 |
content,
|
| 25 |
chat_history,
|
| 26 |
model_name: str,
|
|
|
|
| 49 |
{"top_p": top_p, "temperature": temp, "max_tokens": max_tokens}
|
| 50 |
)
|
| 51 |
|
| 52 |
+
async def model_regen(
|
| 53 |
content,
|
| 54 |
chat_history,
|
| 55 |
model_name: str,
|
|
|
|
| 227 |
def build_demo():
|
| 228 |
# global original_dfs, available_models, gpt4t_dfs, haiku_dfs, llama_dfs
|
| 229 |
|
| 230 |
+
with gradio.Blocks(theme=gradio.themes.Base(), concurrency_limit=4, css=css, js=js_light) as demo:
|
| 231 |
# gradio.HTML(BANNER, elem_id="banner")
|
| 232 |
# gradio.Markdown(HEADER_MD.replace("{model_num}", str(len(original_dfs["-1"]))), elem_classes="markdown-text")
|
| 233 |
|