Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,8 +5,11 @@ from Gradio_UI import GradioUI
|
|
| 5 |
import os
|
| 6 |
from tools.graph_plotter_tool import plot_function_graph
|
| 7 |
from tools.statistical_graph_analyzer import analyze_statistical_graph
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
from tools.media_graph_critic import critique_media_graph
|
| 9 |
-
from tools.statistical_graph_generator import generate_statistical_graph
|
| 10 |
|
| 11 |
#from openinference.instrumentation.smolagents import SmolAgentsInstrumentor
|
| 12 |
|
|
@@ -46,8 +49,17 @@ with open("prompts.yaml", 'r', encoding='utf-8') as stream:
|
|
| 46 |
# O agente usará nosso modelo e nosso prompt, com a única ferramenta de resposta final.
|
| 47 |
agent = CodeAgent(
|
| 48 |
model=model,
|
| 49 |
-
tools=[
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
verbosity_level=1,
|
| 52 |
prompt_templates=prompt_templates
|
| 53 |
)
|
|
|
|
| 5 |
import os
|
| 6 |
from tools.graph_plotter_tool import plot_function_graph
|
| 7 |
from tools.statistical_graph_analyzer import analyze_statistical_graph
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
from tools.statistical_graph_generator import plot_bar_chart, plot_pie_chart, plot_histogram, plot_line_chart
|
| 11 |
+
from tools.statistical_graph_analyzer import analyze_dataset
|
| 12 |
from tools.media_graph_critic import critique_media_graph
|
|
|
|
| 13 |
|
| 14 |
#from openinference.instrumentation.smolagents import SmolAgentsInstrumentor
|
| 15 |
|
|
|
|
| 49 |
# O agente usará nosso modelo e nosso prompt, com a única ferramenta de resposta final.
|
| 50 |
agent = CodeAgent(
|
| 51 |
model=model,
|
| 52 |
+
tools=[
|
| 53 |
+
final_answer,
|
| 54 |
+
plot_function_graph,
|
| 55 |
+
plot_bar_chart,
|
| 56 |
+
plot_pie_chart,
|
| 57 |
+
plot_histogram,
|
| 58 |
+
plot_line_chart,
|
| 59 |
+
analyze_dataset,
|
| 60 |
+
critique_media_graph
|
| 61 |
+
], # Adicione as novas ferramentas aqui
|
| 62 |
+
max_steps=5,
|
| 63 |
verbosity_level=1,
|
| 64 |
prompt_templates=prompt_templates
|
| 65 |
)
|