Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,8 @@ import yaml
|
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
|
8 |
from Gradio_UI import GradioUI
|
9 |
-
|
|
|
10 |
|
11 |
def _patched_handle(step):
|
12 |
# If step is a FinalAnswerStep, extract the inner .final_answer
|
@@ -15,7 +16,7 @@ def _patched_handle(step):
|
|
15 |
# otherwise, call the original
|
16 |
return _orig_handle(step)
|
17 |
|
18 |
-
|
19 |
|
20 |
|
21 |
|
|
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
|
8 |
from Gradio_UI import GradioUI
|
9 |
+
import Gradio_UI
|
10 |
+
_orig_handle = Gradio_UI.handle_agent_output_types
|
11 |
|
12 |
def _patched_handle(step):
|
13 |
# If step is a FinalAnswerStep, extract the inner .final_answer
|
|
|
16 |
# otherwise, call the original
|
17 |
return _orig_handle(step)
|
18 |
|
19 |
+
Gradio_UI.handle_agent_output_types = _patched_handle
|
20 |
|
21 |
|
22 |
|