beitemian commited on
Commit
7855c78
·
verified ·
1 Parent(s): 529602c

temperature fix

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -54,7 +54,7 @@ def check_weather(city: str, country: str) -> str:
54
 
55
  # Extract relevant weather information
56
  current_weather = weather_data['current']
57
- temperature = current_weather['temp']
58
  weather_description = current_weather['weather'][0]['description']
59
 
60
  return f"The current weather in {city}, {country} is {weather_description} with a temperature of {temperature}°C."
 
54
 
55
  # Extract relevant weather information
56
  current_weather = weather_data['current']
57
+ temperature = current_weather['temp']-273.15
58
  weather_description = current_weather['weather'][0]['description']
59
 
60
  return f"The current weather in {city}, {country} is {weather_description} with a temperature of {temperature}°C."