SpyC0der77 commited on
Commit
1a3dc8f
·
verified ·
1 Parent(s): c7f0abc

Update app.py

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