Spaces:
Runtime error
Runtime error
Deploy GAIA agent
Browse files
app.py
CHANGED
@@ -15,10 +15,13 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
15 |
@tool
|
16 |
def simple_search(query: str) -> str:
|
17 |
"""
|
|
|
|
|
18 |
Args:
|
19 |
-
query (str):
|
|
|
20 |
Returns:
|
21 |
-
str:
|
22 |
"""
|
23 |
try:
|
24 |
resp = requests.get(
|
@@ -34,6 +37,7 @@ def simple_search(query: str) -> str:
|
|
34 |
except Exception as e:
|
35 |
return f"Search error: {e}"
|
36 |
|
|
|
37 |
# --- Enhanced Agent using Light Model ---
|
38 |
class BasicAgent:
|
39 |
def __init__(self):
|
|
|
15 |
@tool
|
16 |
def simple_search(query: str) -> str:
|
17 |
"""
|
18 |
+
Performs a DuckDuckGo search and returns the top 3 results.
|
19 |
+
|
20 |
Args:
|
21 |
+
query (str): The search query text.
|
22 |
+
|
23 |
Returns:
|
24 |
+
str: Titles and links of the top 3 search results.
|
25 |
"""
|
26 |
try:
|
27 |
resp = requests.get(
|
|
|
37 |
except Exception as e:
|
38 |
return f"Search error: {e}"
|
39 |
|
40 |
+
|
41 |
# --- Enhanced Agent using Light Model ---
|
42 |
class BasicAgent:
|
43 |
def __init__(self):
|