SilviuMatei commited on
Commit
c9b8fea
·
verified ·
1 Parent(s): 28ba07a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -1,5 +1,11 @@
1
- from smolagents import tool
 
2
  import requests
 
 
 
 
 
3
  from bs4 import BeautifulSoup
4
 
5
  @tool
@@ -8,10 +14,10 @@ def amazon_product_scraper(search_url: str) -> list:
8
  Scrapes Amazon search results for product titles, prices, delivery fees, and links.
9
 
10
  Args:
11
- search_url (str): The URL of the Amazon search results page containing product listings.
12
 
13
  Returns:
14
- list: A list containing two elements:
15
  - A list of dictionaries, each with keys "Title", "Price", "Delivery", "Link", sorted by price.
16
  - A string containing a recommendation for the best deal.
17
  """
 
1
+ from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
2
+ import datetime
3
  import requests
4
+ import pytz
5
+ import yaml
6
+ from tools.final_answer import FinalAnswerTool
7
+
8
+ from Gradio_UI import GradioUI
9
  from bs4 import BeautifulSoup
10
 
11
  @tool
 
14
  Scrapes Amazon search results for product titles, prices, delivery fees, and links.
15
 
16
  Args:
17
+ search_url: The URL of the Amazon search results page containing product listings.
18
 
19
  Returns:
20
+ A list containing two elements:
21
  - A list of dictionaries, each with keys "Title", "Price", "Delivery", "Link", sorted by price.
22
  - A string containing a recommendation for the best deal.
23
  """