Spaces:
Sleeping
Sleeping
Leetmonkey In Action. Darn LeetMonkey these days
Browse files
app.py
CHANGED
|
@@ -152,7 +152,7 @@ Here's the complete Python function implementation:
|
|
| 152 |
|
| 153 |
generated_text = ""
|
| 154 |
for chunk in model(full_prompt, stream=True, **generation_kwargs):
|
| 155 |
-
token = chunk["choices"]["text"]
|
| 156 |
generated_text += token
|
| 157 |
yield generated_text
|
| 158 |
|
|
|
|
| 152 |
|
| 153 |
generated_text = ""
|
| 154 |
for chunk in model(full_prompt, stream=True, **generation_kwargs):
|
| 155 |
+
token = chunk["choices"][0]["text"]
|
| 156 |
generated_text += token
|
| 157 |
yield generated_text
|
| 158 |
|