Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,7 +2,7 @@ import datetime
|
|
| 2 |
import requests
|
| 3 |
import pytz
|
| 4 |
import yaml
|
| 5 |
-
import
|
| 6 |
from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel, load_tool, tool
|
| 7 |
from tools.final_answer import FinalAnswerTool
|
| 8 |
from Gradio_UI import GradioUI
|
|
@@ -12,7 +12,6 @@ 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
|
| 17 |
def get_dcf_of_company(api_key: str, company_name: str) -> str:
|
| 18 |
"""A tool that retrieves the DCF of a company based on its name.
|
|
|
|
| 2 |
import requests
|
| 3 |
import pytz
|
| 4 |
import yaml
|
| 5 |
+
import os
|
| 6 |
from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel, load_tool, tool
|
| 7 |
from tools.final_answer import FinalAnswerTool
|
| 8 |
from Gradio_UI import GradioUI
|
|
|
|
| 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 |
@tool
|
| 16 |
def get_dcf_of_company(api_key: str, company_name: str) -> str:
|
| 17 |
"""A tool that retrieves the DCF of a company based on its name.
|