yasserrmd commited on
Commit
bbc225c
·
verified ·
1 Parent(s): 1a23a7e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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
- #client = InferenceClient()
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 = client.chat.completions.create(
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,