Spaces:
Sleeping
Sleeping
Commit
·
5e571ea
1
Parent(s):
7fbe657
login
Browse files
app.py
CHANGED
@@ -11,8 +11,8 @@ import random
|
|
11 |
import os
|
12 |
from pathlib import Path
|
13 |
|
14 |
-
|
15 |
-
|
16 |
# Define available models
|
17 |
MODELS = [
|
18 |
"meta-llama/Meta-Llama-3-70B-Instruct",
|
@@ -84,14 +84,14 @@ def get_random_model():
|
|
84 |
def create_client(model_id):
|
85 |
return OpenAI(
|
86 |
base_url=f"https://api-inference.huggingface.co/models/{model_id}/v1",
|
87 |
-
api_key=
|
88 |
)
|
89 |
|
90 |
|
91 |
-
client = OpenAI(
|
92 |
-
|
93 |
-
|
94 |
-
)
|
95 |
|
96 |
|
97 |
def generate_prompt():
|
|
|
11 |
import os
|
12 |
from pathlib import Path
|
13 |
|
14 |
+
HF_TOKEN = os.getenv("HF_TOKEN")
|
15 |
+
|
16 |
# Define available models
|
17 |
MODELS = [
|
18 |
"meta-llama/Meta-Llama-3-70B-Instruct",
|
|
|
84 |
def create_client(model_id):
|
85 |
return OpenAI(
|
86 |
base_url=f"https://api-inference.huggingface.co/models/{model_id}/v1",
|
87 |
+
api_key=HF_TOKEN,
|
88 |
)
|
89 |
|
90 |
|
91 |
+
# client = OpenAI(
|
92 |
+
# base_url="https://api-inference.huggingface.co/models/meta-llama/Meta-Llama-3-70B-Instruct/v1",
|
93 |
+
# api_key=HF_TOKEN
|
94 |
+
# )
|
95 |
|
96 |
|
97 |
def generate_prompt():
|