Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ from huggingface_hub import InferenceClient
|
|
3 |
import os
|
4 |
|
5 |
client = InferenceClient("EvanZhouDev/open-genmoji", token=os.getenv("HUGGINGFACE_API_TOKEN"))
|
|
|
6 |
|
7 |
# Define the process function that takes a text prompt and returns an image
|
8 |
def process(prompt):
|
@@ -11,7 +12,7 @@ def process(prompt):
|
|
11 |
{ "role": "user", "content": prompt }
|
12 |
]
|
13 |
|
14 |
-
completion =
|
15 |
model="Qwen/Qwen2.5-72B-Instruct",
|
16 |
messages=messages,
|
17 |
temperature=0.5,
|
|
|
3 |
import os
|
4 |
|
5 |
client = InferenceClient("EvanZhouDev/open-genmoji", token=os.getenv("HUGGINGFACE_API_TOKEN"))
|
6 |
+
llm = InferenceClient(api_key=os.getenv("HUGGINGFACE_API_TOKEN"))
|
7 |
|
8 |
# Define the process function that takes a text prompt and returns an image
|
9 |
def process(prompt):
|
|
|
12 |
{ "role": "user", "content": prompt }
|
13 |
]
|
14 |
|
15 |
+
completion = llm.chat.completions.create(
|
16 |
model="Qwen/Qwen2.5-72B-Instruct",
|
17 |
messages=messages,
|
18 |
temperature=0.5,
|