Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,7 +32,7 @@ class BasicAgent:
|
|
| 32 |
def search(self, question: str) -> str:
|
| 33 |
try:
|
| 34 |
with DDGS() as ddgs:
|
| 35 |
-
results = list(ddgs.text(question, max_results=
|
| 36 |
return results[0]["body"] if results else "No relevant search results found."
|
| 37 |
except Exception as e:
|
| 38 |
return f"Search error: {e}"
|
|
|
|
| 32 |
def search(self, question: str) -> str:
|
| 33 |
try:
|
| 34 |
with DDGS() as ddgs:
|
| 35 |
+
results = list(ddgs.text(question, max_results=3))
|
| 36 |
return results[0]["body"] if results else "No relevant search results found."
|
| 37 |
except Exception as e:
|
| 38 |
return f"Search error: {e}"
|