Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,8 +19,8 @@ def chat(message, history, img=None):
|
|
| 19 |
# Use only text model
|
| 20 |
response = text_model.generate_content(message, stream=True)
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
| 24 |
|
| 25 |
except Exception as e:
|
| 26 |
print(f"Error during generation: {e}")
|
|
|
|
| 19 |
# Use only text model
|
| 20 |
response = text_model.generate_content(message, stream=True)
|
| 21 |
|
| 22 |
+
for chunk in response:
|
| 23 |
+
return to_markdown(chunk.text) # Format as Markdown
|
| 24 |
|
| 25 |
except Exception as e:
|
| 26 |
print(f"Error during generation: {e}")
|