Spaces:
Sleeping
Sleeping
Lucas commited on
Commit ·
b5aa936
1
Parent(s): 1fe9ab4
Updated UI to render images
Browse files- Gradio_UI.py +3 -2
Gradio_UI.py
CHANGED
|
@@ -153,8 +153,9 @@ def stream_to_gradio(
|
|
| 153 |
):
|
| 154 |
yield message
|
| 155 |
|
| 156 |
-
|
| 157 |
-
|
|
|
|
| 158 |
|
| 159 |
if isinstance(final_answer, AgentText):
|
| 160 |
yield gr.ChatMessage(
|
|
|
|
| 153 |
):
|
| 154 |
yield message
|
| 155 |
|
| 156 |
+
# The final streamed item is a FinalAnswerStep. Render its output rather
|
| 157 |
+
# than stringifying the wrapper (which hides AgentImage values).
|
| 158 |
+
final_answer = handle_agent_output_types(step_log.output)
|
| 159 |
|
| 160 |
if isinstance(final_answer, AgentText):
|
| 161 |
yield gr.ChatMessage(
|