XMMR12 commited on
Commit
592ac8f
·
verified ·
1 Parent(s): 8a5710d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -52,7 +52,7 @@ def search_full_plant_information(plant_name:str):
52
  for attempt in range(3): # Retry up to 3 times
53
  try:
54
  search_results = DDGS().text(keywords=query, max_results=5)
55
- except DuckDuckGoSearchException as e:
56
  if "Ratelimit" in str(e):
57
  try:
58
  wait_time = 2 ** attempt # Exponential backoff
 
52
  for attempt in range(3): # Retry up to 3 times
53
  try:
54
  search_results = DDGS().text(keywords=query, max_results=5)
55
+ except Exception as e:
56
  if "Ratelimit" in str(e):
57
  try:
58
  wait_time = 2 ** attempt # Exponential backoff