Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from huggingface_hub import InferenceClient
|
|
5 |
HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
6 |
|
7 |
model2api = [
|
8 |
-
"tiiuae/falcon-180B-chat"
|
9 |
"meta-llama/Llama-2-70b-chat-hf",
|
10 |
"codellama/CodeLlama-34b-Instruct-hf",
|
11 |
"victor/CodeLlama-34b-Instruct-hf",
|
@@ -58,7 +58,8 @@ def generate(
|
|
58 |
|
59 |
client = InferenceClient()
|
60 |
clientList = (client.list_deployed_models('text-generation-inference'))['text-generation']
|
61 |
-
for
|
|
|
62 |
if model in clientList:
|
63 |
client = InferenceClient(model, token=HF_TOKEN)
|
64 |
print(f"Choosen model: {model}")
|
|
|
5 |
HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
6 |
|
7 |
model2api = [
|
8 |
+
"tiiuae/falcon-180B-chat",
|
9 |
"meta-llama/Llama-2-70b-chat-hf",
|
10 |
"codellama/CodeLlama-34b-Instruct-hf",
|
11 |
"victor/CodeLlama-34b-Instruct-hf",
|
|
|
58 |
|
59 |
client = InferenceClient()
|
60 |
clientList = (client.list_deployed_models('text-generation-inference'))['text-generation']
|
61 |
+
for i in range(0, len(model2api)):
|
62 |
+
model = model2api[i]
|
63 |
if model in clientList:
|
64 |
client = InferenceClient(model, token=HF_TOKEN)
|
65 |
print(f"Choosen model: {model}")
|