Spaces:
Sleeping
Sleeping
Zanqi commited on
Commit ·
d2b03f5
1
Parent(s): 41558f1
Fix image content assignment in stream_to_gradio function to reference final_answer's final_answer attribute
Browse files- Gradio_UI.py +1 -1
Gradio_UI.py
CHANGED
|
@@ -165,7 +165,7 @@ def stream_to_gradio(
|
|
| 165 |
yield gr.ChatMessage(
|
| 166 |
role="assistant",
|
| 167 |
# content={"path": final_answer.to_string(), "mime_type": "image/png"},
|
| 168 |
-
content=gr.Image(str(final_answer)),
|
| 169 |
metadata={"mime_type": "image/png"},
|
| 170 |
)
|
| 171 |
elif isinstance(final_answer, AgentAudio):
|
|
|
|
| 165 |
yield gr.ChatMessage(
|
| 166 |
role="assistant",
|
| 167 |
# content={"path": final_answer.to_string(), "mime_type": "image/png"},
|
| 168 |
+
content=gr.Image(str(final_answer.final_answer)),
|
| 169 |
metadata={"mime_type": "image/png"},
|
| 170 |
)
|
| 171 |
elif isinstance(final_answer, AgentAudio):
|