Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,8 @@ from typing import List, Tuple
|
|
5 |
|
6 |
# Define available models
|
7 |
AVAILABLE_MODELS = {
|
8 |
-
"DeepSeek V3": "deepseek-ai/DeepSeek-V3",
|
|
|
9 |
"Llama3.3-70b-Instruct": "meta-llama/Llama-3.3-70B-Instruct",
|
10 |
"Llama3.1-8b-Instruct": "meta-llama/Meta-Llama-3.1-8B-Instruct",
|
11 |
}
|
@@ -16,8 +17,6 @@ HYPERB_API_KEY = os.getenv('HYPERBOLIC_XYZ_KEY')
|
|
16 |
HF_API_KEY = os.getenv('HF_KEY')
|
17 |
PASSWORD = os.getenv("PASSWD") # Store the password in an environment variable
|
18 |
|
19 |
-
DEPLOY_TO_HF = ["deepseek-ai/DeepSeek-V3"]
|
20 |
-
|
21 |
hyperb_client = OpenAI(base_url=HYPERB_ENDPOINT_URL, api_key=HYPERB_API_KEY)
|
22 |
hf_client = OpenAI(base_url=HF_ENDPOINT_URL, api_key=HF_API_KEY)
|
23 |
|
@@ -39,8 +38,8 @@ def respond(
|
|
39 |
messages.append({"role": "user", "content": message})
|
40 |
|
41 |
response = ""
|
42 |
-
|
43 |
-
if
|
44 |
this_client = hf_client
|
45 |
else:
|
46 |
this_client = hyperb_client
|
|
|
5 |
|
6 |
# Define available models
|
7 |
AVAILABLE_MODELS = {
|
8 |
+
"DeepSeek V3 (Hyperbolic.xyz)": "deepseek-ai/DeepSeek-V3",
|
9 |
+
"DeepSeek V3 (HuggingFace.co)": "deepseek-ai/DeepSeek-V3",
|
10 |
"Llama3.3-70b-Instruct": "meta-llama/Llama-3.3-70B-Instruct",
|
11 |
"Llama3.1-8b-Instruct": "meta-llama/Meta-Llama-3.1-8B-Instruct",
|
12 |
}
|
|
|
17 |
HF_API_KEY = os.getenv('HF_KEY')
|
18 |
PASSWORD = os.getenv("PASSWD") # Store the password in an environment variable
|
19 |
|
|
|
|
|
20 |
hyperb_client = OpenAI(base_url=HYPERB_ENDPOINT_URL, api_key=HYPERB_API_KEY)
|
21 |
hf_client = OpenAI(base_url=HF_ENDPOINT_URL, api_key=HF_API_KEY)
|
22 |
|
|
|
38 |
messages.append({"role": "user", "content": message})
|
39 |
|
40 |
response = ""
|
41 |
+
|
42 |
+
if "(HuggingFace.co)" in model_choice:
|
43 |
this_client = hf_client
|
44 |
else:
|
45 |
this_client = hyperb_client
|