Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,6 +7,10 @@ from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel, load_tool, t
|
|
| 7 |
from tools.final_answer import FinalAnswerTool
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
# Define a tool to retrieve the Discounted Cash Flow (DCF) of a company
|
| 11 |
@spaces.GPU
|
| 12 |
@tool
|
|
|
|
| 7 |
from tools.final_answer import FinalAnswerTool
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
| 10 |
+
api_key = os.getenv("ALPHAVANTAGE")
|
| 11 |
+
if not api_key:
|
| 12 |
+
raise ValueError("\u26a0\ufe0f Key is missing! Add it as a Secret in Hugging Face Spaces.")
|
| 13 |
+
|
| 14 |
# Define a tool to retrieve the Discounted Cash Flow (DCF) of a company
|
| 15 |
@spaces.GPU
|
| 16 |
@tool
|