Spaces:
Runtime error
Runtime error
Leonardo
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -89,28 +89,46 @@ from huggingface_hub import login
|
|
| 89 |
from rich.console import Console
|
| 90 |
from rich.logging import RichHandler
|
| 91 |
from smolagents import FinalAnswerTool # smolagents
|
| 92 |
-
from smolagents import (
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
|
| 98 |
# local
|
| 99 |
-
from scripts.finance_tools import (
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
from scripts.flux_lora_tool import FluxLoRATool
|
| 109 |
from scripts.text_cleaner_tool import TextCleanerTool
|
| 110 |
from scripts.text_inspector_tool import TextInspectorTool
|
| 111 |
-
from scripts.text_web_browser import (
|
| 112 |
-
|
| 113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
from scripts.time_tools import get_temporal_context
|
| 115 |
from scripts.visual_qa import visualizer
|
| 116 |
|
|
@@ -135,7 +153,7 @@ AUTHORIZED_IMPORTS = [
|
|
| 135 |
"pubchempy", # Accessing PubChem chemical database
|
| 136 |
"yaml",
|
| 137 |
"xml", # XML processing
|
| 138 |
-
"yahoo_finance", # Fetching stock datauv
|
| 139 |
"Bio", # Bioinformatics tools (e.g., sequence analysis)
|
| 140 |
"sklearn", # Scikit-learn for machine learning
|
| 141 |
"scipy", # Scientific computing (stats, optimization)
|
|
|
|
| 89 |
from rich.console import Console
|
| 90 |
from rich.logging import RichHandler
|
| 91 |
from smolagents import FinalAnswerTool # smolagents
|
| 92 |
+
from smolagents import (
|
| 93 |
+
CodeAgent,
|
| 94 |
+
GoogleSearchTool,
|
| 95 |
+
HfApiModel,
|
| 96 |
+
LiteLLMModel,
|
| 97 |
+
OpenAIServerModel,
|
| 98 |
+
Tool,
|
| 99 |
+
TransformersModel,
|
| 100 |
+
)
|
| 101 |
+
from smolagents.agent_types import AgentText, handle_agent_output_types
|
| 102 |
+
from smolagents.gradio_ui import pull_messages_from_step
|
| 103 |
|
| 104 |
# local
|
| 105 |
+
from scripts.finance_tools import (
|
| 106 |
+
DataVisualizationTool,
|
| 107 |
+
FinancialCalculatorTool,
|
| 108 |
+
TrendAnalysisTool,
|
| 109 |
+
get_balance_sheet_data,
|
| 110 |
+
get_cash_flow_data,
|
| 111 |
+
get_company_overview_data,
|
| 112 |
+
get_earnings_data,
|
| 113 |
+
get_income_statement_data,
|
| 114 |
+
get_market_news_sentiment,
|
| 115 |
+
get_stock_quote_data,
|
| 116 |
+
get_time_series_daily,
|
| 117 |
+
search_symbols,
|
| 118 |
+
)
|
| 119 |
from scripts.flux_lora_tool import FluxLoRATool
|
| 120 |
from scripts.text_cleaner_tool import TextCleanerTool
|
| 121 |
from scripts.text_inspector_tool import TextInspectorTool
|
| 122 |
+
from scripts.text_web_browser import (
|
| 123 |
+
ArchiveSearchTool,
|
| 124 |
+
DownloadTool,
|
| 125 |
+
FinderTool,
|
| 126 |
+
FindNextTool,
|
| 127 |
+
PageDownTool,
|
| 128 |
+
PageUpTool,
|
| 129 |
+
SimpleTextBrowser,
|
| 130 |
+
VisitTool,
|
| 131 |
+
)
|
| 132 |
from scripts.time_tools import get_temporal_context
|
| 133 |
from scripts.visual_qa import visualizer
|
| 134 |
|
|
|
|
| 153 |
"pubchempy", # Accessing PubChem chemical database
|
| 154 |
"yaml",
|
| 155 |
"xml", # XML processing
|
| 156 |
+
"yahoo_finance", # Fetching stock datauv
|
| 157 |
"Bio", # Bioinformatics tools (e.g., sequence analysis)
|
| 158 |
"sklearn", # Scikit-learn for machine learning
|
| 159 |
"scipy", # Scientific computing (stats, optimization)
|