Spaces:
Running
Running
add time.sleep(70)
Browse files- tools/web_search.py +1 -0
tools/web_search.py
CHANGED
@@ -20,6 +20,7 @@ class DuckDuckGoSearchTool(Tool):
|
|
20 |
self.ddgs = DDGS(**kwargs)
|
21 |
|
22 |
def forward(self, query: str) -> str:
|
|
|
23 |
results = self.ddgs.text(query, max_results=self.max_results)
|
24 |
if len(results) == 0:
|
25 |
raise Exception("No results found! Try a less restrictive/shorter query.")
|
|
|
20 |
self.ddgs = DDGS(**kwargs)
|
21 |
|
22 |
def forward(self, query: str) -> str:
|
23 |
+
time.sleep(70)
|
24 |
results = self.ddgs.text(query, max_results=self.max_results)
|
25 |
if len(results) == 0:
|
26 |
raise Exception("No results found! Try a less restrictive/shorter query.")
|