Spaces:
Running
Running
Update PolyAgent/gradio_interface.py
Browse files
PolyAgent/gradio_interface.py
CHANGED
|
@@ -1240,7 +1240,10 @@ def llm_only_answer(state: Dict[str, Any], model_name: str, prompt: str) -> str:
|
|
| 1240 |
}
|
| 1241 |
)
|
| 1242 |
|
| 1243 |
-
|
|
|
|
|
|
|
|
|
|
| 1244 |
|
| 1245 |
try:
|
| 1246 |
resp = client.chat_completion(
|
|
@@ -1261,7 +1264,6 @@ def llm_only_answer(state: Dict[str, Any], model_name: str, prompt: str) -> str:
|
|
| 1261 |
except Exception as e:
|
| 1262 |
return pretty_json({"ok": False, "error": str(e), "model_id": model_id})
|
| 1263 |
|
| 1264 |
-
|
| 1265 |
def build_ui() -> gr.Blocks:
|
| 1266 |
with gr.Blocks(
|
| 1267 |
css="""
|
|
|
|
| 1240 |
}
|
| 1241 |
)
|
| 1242 |
|
| 1243 |
+
if m == "mixtral-8x22b-instruct":
|
| 1244 |
+
client = InferenceClient(model=model_id, token=HF_TOKEN, provider="fireworks-ai")
|
| 1245 |
+
else:
|
| 1246 |
+
client = InferenceClient(model=model_id, token=HF_TOKEN)
|
| 1247 |
|
| 1248 |
try:
|
| 1249 |
resp = client.chat_completion(
|
|
|
|
| 1264 |
except Exception as e:
|
| 1265 |
return pretty_json({"ok": False, "error": str(e), "model_id": model_id})
|
| 1266 |
|
|
|
|
| 1267 |
def build_ui() -> gr.Blocks:
|
| 1268 |
with gr.Blocks(
|
| 1269 |
css="""
|