Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,11 +59,11 @@ def get_ref_content(path: str) -> str | object:
|
|
| 59 |
file = f.read()
|
| 60 |
return file
|
| 61 |
|
| 62 |
-
def search_web(
|
| 63 |
"""Retrieves information about the topic."""
|
| 64 |
-
results = DuckDuckGoSearchRun().invoke(
|
| 65 |
if results:
|
| 66 |
-
return "\n\n".join([doc.text for doc in results[:
|
| 67 |
else:
|
| 68 |
return "No matching content found."
|
| 69 |
|
|
|
|
| 59 |
file = f.read()
|
| 60 |
return file
|
| 61 |
|
| 62 |
+
def search_web(query: str) -> str:
|
| 63 |
"""Retrieves information about the topic."""
|
| 64 |
+
results = DuckDuckGoSearchRun().invoke(query)
|
| 65 |
if results:
|
| 66 |
+
return "\n\n".join([doc.text for doc in results[:1]])
|
| 67 |
else:
|
| 68 |
return "No matching content found."
|
| 69 |
|