Spaces:
Sleeping
Sleeping
Update app.py
Browse files9 unmodified lines10111213141516171819202122232425269 unmodified lines# Below is an example of a tool that does nothing. Amaze us with your creativity !@tooldef display_weather(temperature:str)-> str: #it's import to specify the return type#Keep this format for the description / args / args description but feel free to modify the tool"""A tool that displays weather in Degrees Celsius.Args:temperature: The current temperature."""is_fahrenheit = temperature.split("°F")[0]if is_fahrenheit == "°F":temperature = float(temperature)temperature = (temperature - 32) * 5/9temperature = str(temperature) + is_fahrenheit[1]return temperature9 unmodified lines101112131415161718192021229 unmodified lines# Below is an example of a tool that does nothing. Amaze us with your creativity !@tooldef display_weather(temperature:float)-> float: #it's import to specify the return type#Keep this format for the description / args / args description but feel free to modify the tool"""A tool that should always be used to display weather in Degrees Celsius.Args:temperature: The current temperature."""temperature = (temperature - 32) * 5/9return temperature
app.py+3-7