Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -326,9 +326,9 @@ def generate_pitch_deck(company_name, url):
|
|
| 326 |
)
|
| 327 |
|
| 328 |
# Stream the response
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
response += chunk.choices[0].delta.content or ''
|
| 333 |
response = response.replace("```","").replace("markdown", "")
|
| 334 |
update_display(Markdown(response), display_id=display_handle.display_id) # Yield intermediate results for streaming
|
|
|
|
| 326 |
)
|
| 327 |
|
| 328 |
# Stream the response
|
| 329 |
+
response = ""
|
| 330 |
+
display_handle = display(Markdown(""), display_id=True)
|
| 331 |
+
for chunk in stream:
|
| 332 |
response += chunk.choices[0].delta.content or ''
|
| 333 |
response = response.replace("```","").replace("markdown", "")
|
| 334 |
update_display(Markdown(response), display_id=display_handle.display_id) # Yield intermediate results for streaming
|