Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from huggingface_hub import InferenceClient
|
|
4 |
|
5 |
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
6 |
|
7 |
-
|
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 |
-
|
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,
|