tournas commited on
Commit
b85f00c
·
verified ·
1 Parent(s): 785aaa0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
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