Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,25 @@ from tools.final_answer import FinalAnswerTool
|
|
7 |
|
8 |
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 my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
|
|
7 |
|
8 |
from Gradio_UI import GradioUI
|
9 |
|
10 |
+
# ============ Weather function
|
11 |
+
|
12 |
+
|
13 |
+
import meterostat
|
14 |
+
|
15 |
+
def get_weather(city) -> None:
|
16 |
+
# declare the client. the measuring unit used defaults to the metric system (celcius, km/h, etc.)
|
17 |
+
return "Temps de merde"
|
18 |
+
|
19 |
+
|
20 |
+
# =============== TOOLS
|
21 |
+
|
22 |
+
@tool
|
23 |
+
def weather_tool(city:string) -> str:
|
24 |
+
"""
|
25 |
+
Returns the weather of a city
|
26 |
+
"""
|
27 |
+
return getweather(city)
|
28 |
+
|
29 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
30 |
@tool
|
31 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|