Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,19 +24,19 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
| 24 |
class BasicAgent:
|
| 25 |
def __init__(self):
|
| 26 |
print("BasicAgent initialized. . . .")
|
| 27 |
-
|
| 28 |
-
self.api_key = os.getenv("HF_TOKEN")
|
| 29 |
-
self.llm = HuggingFaceInferenceAPI(
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
)
|
| 35 |
-
self.agent = AgentWorkflow.from_tools_or_functions(
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
)
|
| 40 |
|
| 41 |
async def run(self, question: str) -> str:
|
| 42 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
|
|
|
| 24 |
class BasicAgent:
|
| 25 |
def __init__(self):
|
| 26 |
print("BasicAgent initialized. . . .")
|
| 27 |
+
self.agent = smart_agent()
|
| 28 |
+
# self.api_key = os.getenv("HF_TOKEN")
|
| 29 |
+
# self.llm = HuggingFaceInferenceAPI(
|
| 30 |
+
# model_name="deepseek-ai/DeepSeek-R1-0528",
|
| 31 |
+
# token=self.api_key,
|
| 32 |
+
# provider="auto",
|
| 33 |
+
# max_iterations=10
|
| 34 |
+
# )
|
| 35 |
+
# self.agent = AgentWorkflow.from_tools_or_functions(
|
| 36 |
+
# [wikipedia_search_tool, youtube_transcript_tool, youtube_transcript_snippet_tool,
|
| 37 |
+
# round_to_two_decimals_tool, text_inverter_tool, google_web_search_tool],
|
| 38 |
+
# llm=self.llm
|
| 39 |
+
# )
|
| 40 |
|
| 41 |
async def run(self, question: str) -> str:
|
| 42 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|