adammontano commited on
Commit
95e85ed
·
verified ·
1 Parent(s): 8ef26ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -14
app.py CHANGED
@@ -9,22 +9,12 @@ from Gradio_UI import GradioUI
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
- def temp_converter(temp_unit:str, temp:float)-> float: #it's import to specify the return type
13
- """A tool converts between celsius and fahrenheit
14
  Args:
15
- temp_unit: the temperature unit given i.e. either celsius or fahrenheit
16
- temp: the temperature amount
17
  """
18
- if temp_unit == "fahrenheit":
19
- return fahrenheit_to_celsius(temp)
20
- if temp_unit == "celsius":
21
- return fahrenheit_to_celsius(temp)
22
-
23
- def celsius_to_fahrenheit(temp):
24
- return (temp*(9/5))+32
25
-
26
- def fahrenheit_to_celsius(temp):
27
- return (temp-32)/(9/5)
28
 
29
 
30
  @tool
 
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
+ def ddg_search(search:str)-> str: #it's import to specify the return type
13
+ """A tool that searches the web with duckduckgo
14
  Args:
15
+ search: the search term used in the duckduckgo search
 
16
  """
17
+ return DuckDuckGoSearchTool.forward(search)
 
 
 
 
 
 
 
 
 
18
 
19
 
20
  @tool