Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -131,9 +131,9 @@ async def stream_chat(message: str, history: list, model: str, temperature: floa
|
|
| 131 |
print(response)
|
| 132 |
|
| 133 |
buffer = ""
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
|
| 138 |
|
| 139 |
def main(message: str, history: list, model: str, temperature: float, max_new_tokens: int, top_p: float, top_k: int, penalty: float):
|
|
|
|
| 131 |
print(response)
|
| 132 |
|
| 133 |
buffer = ""
|
| 134 |
+
for chunk in response:
|
| 135 |
+
buffer += chunk["message"]["content"]
|
| 136 |
+
yield buffer
|
| 137 |
|
| 138 |
|
| 139 |
def main(message: str, history: list, model: str, temperature: float, max_new_tokens: int, top_p: float, top_k: int, penalty: float):
|