wwpop commited on
Commit
68f68a8
1 Parent(s): 9b4de0c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -5,7 +5,7 @@ api_key=os.environ.get('qwen_API_KEY')
5
  """
6
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
7
  """
8
- client = InferenceClient(api_key=api_key)
9
 
10
 
11
  def respond(
@@ -29,13 +29,12 @@ def respond(
29
  response = ""
30
 
31
  for message in client.chat_completion(
32
- model="Qwen/Qwen2.5-72B-Instruct",
33
  messages,
34
  max_tokens=max_tokens,
35
  stream=True,
36
  temperature=temperature,
37
  top_p=top_p,
38
- )
39
  token = message.choices[0].delta.content
40
 
41
  response += token
 
5
  """
6
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
7
  """
8
+ client = InferenceClient("Qwen/Qwen2.5-72B-Instruct",api_key)
9
 
10
 
11
  def respond(
 
29
  response = ""
30
 
31
  for message in client.chat_completion(
 
32
  messages,
33
  max_tokens=max_tokens,
34
  stream=True,
35
  temperature=temperature,
36
  top_p=top_p,
37
+ ):
38
  token = message.choices[0].delta.content
39
 
40
  response += token