Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,16 +3,16 @@ from huggingface_hub import InferenceClient
|
|
3 |
|
4 |
|
5 |
def client_fn(model):
|
6 |
-
if "
|
7 |
-
return InferenceClient("
|
8 |
-
elif "
|
9 |
-
return InferenceClient("
|
10 |
elif "Mistral" in model:
|
11 |
return InferenceClient("mistralai/Mistral-7B-Instruct-v0.3")
|
12 |
elif "Phi" in model:
|
13 |
return InferenceClient("microsoft/Phi-3-mini-4k-instruct")
|
14 |
else:
|
15 |
-
return InferenceClient("
|
16 |
|
17 |
system_instructions1 = "[SYSTEM] Your task is to Answer the question. Keep conversation very short, clear and concise. The expectation is that you will avoid introductions and start answering the query directly, Only answer the question asked by user, Do not say unnecessary things.[QUESTION]"
|
18 |
|
@@ -40,5 +40,5 @@ def models(text, model="Mixtral 8x7B"):
|
|
40 |
description="""# Chat GO
|
41 |
### Inspired from Google Go"""
|
42 |
|
43 |
-
demo = gr.Interface(description=description,fn=models, inputs=["text", gr.Dropdown([ 'Mixtral 8x7B','
|
44 |
demo.launch()
|
|
|
3 |
|
4 |
|
5 |
def client_fn(model):
|
6 |
+
if "Nous" in model:
|
7 |
+
return InferenceClient("NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO")
|
8 |
+
elif "Star" in model:
|
9 |
+
return InferenceClient("HuggingFaceH4/starchat2-15b-v0.1")
|
10 |
elif "Mistral" in model:
|
11 |
return InferenceClient("mistralai/Mistral-7B-Instruct-v0.3")
|
12 |
elif "Phi" in model:
|
13 |
return InferenceClient("microsoft/Phi-3-mini-4k-instruct")
|
14 |
else:
|
15 |
+
return InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
16 |
|
17 |
system_instructions1 = "[SYSTEM] Your task is to Answer the question. Keep conversation very short, clear and concise. The expectation is that you will avoid introductions and start answering the query directly, Only answer the question asked by user, Do not say unnecessary things.[QUESTION]"
|
18 |
|
|
|
40 |
description="""# Chat GO
|
41 |
### Inspired from Google Go"""
|
42 |
|
43 |
+
demo = gr.Interface(description=description,fn=models, inputs=["text", gr.Dropdown([ 'Mixtral 8x7B','Nous Hermes Mixtral 8x7B DPO','StarChat2 15b','Mistral 7B v0.3','Phi 3 mini', ], value="Mistral 7B v0.3", label="Select Model") ], outputs="text", live=True, batch=True, max_batch_size=1000)
|
44 |
demo.launch()
|