Lucas commited on
Commit
b5aa936
·
1 Parent(s): 1fe9ab4

Updated UI to render images

Browse files
Files changed (1) hide show
  1. Gradio_UI.py +3 -2
Gradio_UI.py CHANGED
@@ -153,8 +153,9 @@ def stream_to_gradio(
153
  ):
154
  yield message
155
 
156
- final_answer = step_log # Last log is the run's final_answer
157
- final_answer = handle_agent_output_types(final_answer)
 
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(