Spaces:
Sleeping
Sleeping
Update Gradio_UI.py
Browse files- Gradio_UI.py +6 -1
Gradio_UI.py
CHANGED
|
@@ -153,7 +153,12 @@ def stream_to_gradio(
|
|
| 153 |
):
|
| 154 |
yield message
|
| 155 |
|
| 156 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
final_answer = handle_agent_output_types(final_answer)
|
| 158 |
|
| 159 |
if isinstance(final_answer, AgentText):
|
|
|
|
| 153 |
):
|
| 154 |
yield message
|
| 155 |
|
| 156 |
+
|
| 157 |
+
if hasattr(step_log, "final_answer"):
|
| 158 |
+
final_answer = step_log.final_answer
|
| 159 |
+
else:
|
| 160 |
+
final_answer = step_log
|
| 161 |
+
|
| 162 |
final_answer = handle_agent_output_types(final_answer)
|
| 163 |
|
| 164 |
if isinstance(final_answer, AgentText):
|