codeblacks commited on
Commit
60b402d
·
verified ·
1 Parent(s): 02c027c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,7 +4,7 @@ from huggingface_hub import InferenceClient
4
 
5
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
6
 
7
- async def respond(
8
  message,
9
  history: list[tuple[str, str]],
10
  system_message,
@@ -24,7 +24,7 @@ async def respond(
24
  messages.append({"role": "user", "content": message})
25
 
26
  response = ""
27
- async for message in client.chat_completion(
28
  messages,
29
  max_tokens=max_tokens,
30
  stream=True,
 
4
 
5
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
6
 
7
+ def respond(
8
  message,
9
  history: list[tuple[str, str]],
10
  system_message,
 
24
  messages.append({"role": "user", "content": message})
25
 
26
  response = ""
27
+ for message in client.chat_completion(
28
  messages,
29
  max_tokens=max_tokens,
30
  stream=True,