Spaces:
Sleeping
Sleeping
clementmandron
commited on
Commit
·
2bbd0e5
1
Parent(s):
213eb75
first
Browse files
app.py
CHANGED
@@ -6,18 +6,6 @@ import yaml
|
|
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
|
14 |
-
if step.__class__.__name__ == 'FinalAnswerStep':
|
15 |
-
return step.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 |
|
23 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
|
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
|
8 |
from Gradio_UI import GradioUI
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
|
11 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|