Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ app = FastAPI()
|
|
14 |
app.mount("/static", StaticFiles(directory="static"), name="static")
|
15 |
|
16 |
# Initialize Hugging Face Inference Client
|
17 |
-
|
18 |
|
19 |
client = Groq()
|
20 |
|
@@ -75,7 +75,7 @@ async def generate_infographic(request: InfographicRequest):
|
|
75 |
prompt = PROMPT_TEMPLATE.format(description=description)
|
76 |
|
77 |
messages = [{"role": "user", "content": prompt}]
|
78 |
-
stream =
|
79 |
model="Qwen/Qwen2.5-Coder-32B-Instruct",
|
80 |
messages=messages,
|
81 |
temperature=0.4,
|
|
|
14 |
app.mount("/static", StaticFiles(directory="static"), name="static")
|
15 |
|
16 |
# Initialize Hugging Face Inference Client
|
17 |
+
clientHFInference = InferenceClient()
|
18 |
|
19 |
client = Groq()
|
20 |
|
|
|
75 |
prompt = PROMPT_TEMPLATE.format(description=description)
|
76 |
|
77 |
messages = [{"role": "user", "content": prompt}]
|
78 |
+
stream = clientHFInference.chat.completions.create(
|
79 |
model="Qwen/Qwen2.5-Coder-32B-Instruct",
|
80 |
messages=messages,
|
81 |
temperature=0.4,
|