Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,11 +3,11 @@ import gradio as gr
|
|
| 3 |
from openai import OpenAI
|
| 4 |
from typing import List, Tuple
|
| 5 |
|
| 6 |
-
CLIENTS =
|
| 7 |
"perplexity":{"key":os.getenv('PX_KEY'),"endpoint":"https://api.perplexity.ai"},
|
| 8 |
"hyperbolic":{"key":os.getenv('HYPERBOLIC_XYZ_KEY'),"endpoint":"https://api.hyperbolic.xyz/v1"},
|
| 9 |
"huggingface":{"key":os.getenv('HF_KEY'),"endpoint":"https://huggingface.co/api/inference-proxy/together"},
|
| 10 |
-
|
| 11 |
for client_type in CLIENTS:
|
| 12 |
CLIENTS[client_type]["client"] = OpenAI(base_url=CLIENTS[client_type]["endpoint"], api_key=CLIENTS[client_type]["key"])
|
| 13 |
|
|
|
|
| 3 |
from openai import OpenAI
|
| 4 |
from typing import List, Tuple
|
| 5 |
|
| 6 |
+
CLIENTS = {
|
| 7 |
"perplexity":{"key":os.getenv('PX_KEY'),"endpoint":"https://api.perplexity.ai"},
|
| 8 |
"hyperbolic":{"key":os.getenv('HYPERBOLIC_XYZ_KEY'),"endpoint":"https://api.hyperbolic.xyz/v1"},
|
| 9 |
"huggingface":{"key":os.getenv('HF_KEY'),"endpoint":"https://huggingface.co/api/inference-proxy/together"},
|
| 10 |
+
}
|
| 11 |
for client_type in CLIENTS:
|
| 12 |
CLIENTS[client_type]["client"] = OpenAI(base_url=CLIENTS[client_type]["endpoint"], api_key=CLIENTS[client_type]["key"])
|
| 13 |
|