Spaces:
Runtime error
Runtime error
Update app.py
Browse filesFix indentation error in the Python
app.py
CHANGED
|
@@ -16,10 +16,10 @@ def celcius_tool(convertTo:str, temperature:int)-> str: #it's important to speci
|
|
| 16 |
convertTo: Which temp to convert to F=Fahrenheit, C=Celsius
|
| 17 |
tempurature: Convert the tempurature to either F or C, as specified
|
| 18 |
"""
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
|
| 24 |
@tool
|
| 25 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 16 |
convertTo: Which temp to convert to F=Fahrenheit, C=Celsius
|
| 17 |
tempurature: Convert the tempurature to either F or C, as specified
|
| 18 |
"""
|
| 19 |
+
if convertTo == "F":
|
| 20 |
+
return f"Temperature {temperature} degrees in Fahrenheit is {(temperature * 1.8) + 32}"
|
| 21 |
+
else:
|
| 22 |
+
return f"Temperature {temperature} degrees in Celsius is {(temperature - 32) * 5/9}"
|
| 23 |
|
| 24 |
@tool
|
| 25 |
def get_current_time_in_timezone(timezone: str) -> str:
|