palbha commited on
Commit
bed3240
·
verified ·
1 Parent(s): 919bf18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,7 +10,7 @@ from bs4 import BeautifulSoup
10
 
11
  # Define a function to extract image URLs from DuckDuckGo search
12
  @tool
13
- def search_images_for_presentation(query: str) -> list:
14
  """
15
  Searches for images related to a given query.
16
 
@@ -32,7 +32,7 @@ def search_images_for_presentation(query: str) -> list:
32
  soup = BeautifulSoup(helium.get_driver().page_source, "html.parser")
33
  images = [img["src"] for img in soup.find_all("img") if "src" in img.attrs]
34
 
35
- return images[:5] # Return the top 5 image URLs
36
 
37
 
38
  # Initialize agent
 
10
 
11
  # Define a function to extract image URLs from DuckDuckGo search
12
  @tool
13
+ def search_images_for_presentation(query: str) -> str:
14
  """
15
  Searches for images related to a given query.
16
 
 
32
  soup = BeautifulSoup(helium.get_driver().page_source, "html.parser")
33
  images = [img["src"] for img in soup.find_all("img") if "src" in img.attrs]
34
 
35
+ return images[0] # Return the top 5 image URLs
36
 
37
 
38
  # Initialize agent