Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ def generate_output_stream(prompt):
|
|
15 |
chunk = next(output_stream)
|
16 |
if chunk.get('choices') and chunk['choices'][0].get('text'):
|
17 |
text = chunk['choices'][0]['text']
|
18 |
-
yield text
|
19 |
time.sleep(0.01) # Adjust the delay if needed
|
20 |
except StopIteration:
|
21 |
break
|
|
|
15 |
chunk = next(output_stream)
|
16 |
if chunk.get('choices') and chunk['choices'][0].get('text'):
|
17 |
text = chunk['choices'][0]['text']
|
18 |
+
yield f"{text}\n"
|
19 |
time.sleep(0.01) # Adjust the delay if needed
|
20 |
except StopIteration:
|
21 |
break
|