zavavan commited on
Commit
5d8f7ac
·
verified ·
1 Parent(s): d182c1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,7 +12,7 @@ from Gradio_UI import GradioUI
12
 
13
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
14
  @tool
15
- def scrape_drug_reviews(drug:str)-> dataframe: #it's import to specify the return type
16
  #Keep this format for the description / args / args description but feel free to modify the tool
17
  """A tool that calls a scraping function on the drugs.com website to scrape for reviews on target dtug specified in input
18
  Args:
@@ -22,7 +22,7 @@ def scrape_drug_reviews(drug:str)-> dataframe: #it's import to specify the retur
22
  try:
23
  data = scrape_drugs_com_reviews(drug)
24
  # Get current time in that timezone
25
- return data
26
  except Exception as e:
27
  return f"Error fetching reviews for the target drug you provided: '{drug}'"
28
 
 
12
 
13
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
14
  @tool
15
+ def scrape_drug_reviews(drug:str)-> str: #it's import to specify the return type
16
  #Keep this format for the description / args / args description but feel free to modify the tool
17
  """A tool that calls a scraping function on the drugs.com website to scrape for reviews on target dtug specified in input
18
  Args:
 
22
  try:
23
  data = scrape_drugs_com_reviews(drug)
24
  # Get current time in that timezone
25
+ return data.to_string()
26
  except Exception as e:
27
  return f"Error fetching reviews for the target drug you provided: '{drug}'"
28