Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
import os
|
4 |
-
|
5 |
"""
|
6 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
7 |
"""
|
@@ -12,22 +12,22 @@ from openai import OpenAI, AsyncOpenAI
|
|
12 |
clients = {}
|
13 |
|
14 |
try:
|
15 |
-
clients['32B-Pro (beta)'] = [OpenAI(api_key
|
16 |
except:
|
17 |
pass
|
18 |
|
19 |
try:
|
20 |
-
clients['32B QWQ (experimental, without any additional tuning after LEP!)'] = [OpenAI(api_key
|
21 |
except:
|
22 |
pass
|
23 |
|
24 |
try:
|
25 |
-
clients['7B (work in progress)'] = [OpenAI(api_key
|
26 |
except:
|
27 |
pass
|
28 |
|
29 |
try:
|
30 |
-
clients['3B'] = [OpenAI(api_key='
|
31 |
except:
|
32 |
pass
|
33 |
|
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
import os
|
4 |
+
|
5 |
"""
|
6 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
7 |
"""
|
|
|
12 |
clients = {}
|
13 |
|
14 |
try:
|
15 |
+
clients['32B-Pro (beta)'] = [OpenAI(api_key==os.getenv('API_KEY'), base_url=os.getenv('MODEL_NAME_OR_PATH_32B')), requests.get(os.getenv('MODEL_NAME_OR_PATH_32B') + '/models').json()['data'][0]['id']]
|
16 |
except:
|
17 |
pass
|
18 |
|
19 |
try:
|
20 |
+
clients['32B QWQ (experimental, without any additional tuning after LEP!)'] = [OpenAI(api_key==os.getenv('API_KEY'), base_url=os.getenv('MODEL_NAME_OR_PATH_QWQ')), requests.get(os.getenv('MODEL_NAME_OR_PATH_QWQ') + '/models').json()['data'][0]['id']]
|
21 |
except:
|
22 |
pass
|
23 |
|
24 |
try:
|
25 |
+
clients['7B (work in progress)'] = [OpenAI(api_key==os.getenv('API_KEY'), base_url=os.getenv('MODEL_NAME_OR_PATH_7B')), requests.get(os.getenv('MODEL_NAME_OR_PATH_7B') + '/models').json()['data'][0]['id']]
|
26 |
except:
|
27 |
pass
|
28 |
|
29 |
try:
|
30 |
+
clients['3B'] = [OpenAI(api_key=os.getenv('API_KEY'), base_url=os.getenv('MODEL_NAME_OR_PATH_3B')), requests.get(os.getenv('MODEL_NAME_OR_PATH_3B') + '/models').json()['data'][0]['id']]
|
31 |
except:
|
32 |
pass
|
33 |
|