ddeng1990 commited on
Commit
bfd1690
·
verified ·
1 Parent(s): 8e01942

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -28,7 +28,7 @@ def get_weather_forecast(city: str, date: str, api_key: str) -> str:
28
 
29
  Args:
30
  city: The name of the city.
31
- date: The date inാരോഗ്യകേന്ദ്രം-MM-DD format.
32
  api_key: Your OpenWeatherMap API key.
33
 
34
  Returns:
@@ -69,7 +69,7 @@ def get_weather_forecast(city: str, date: str, api_key: str) -> str:
69
  except requests.exceptions.RequestException as e:
70
  return f"Error connecting to OpenWeatherMap API: {e}"
71
  except ValueError:
72
- return "Invalid date format. Please useാരോഗ്യകേന്ദ്രം-MM-DD."
73
  except KeyError:
74
  return "Weather data not available or API key is invalid"
75
 
@@ -77,7 +77,7 @@ def calculate_days_until_date(future_date: str) -> int:
77
  """Calculates the number of days until a specified future date.
78
 
79
  Args:
80
- future_date: The future date inാരോഗ്യകേന്ദ്രം-MM-DD format.
81
 
82
  Returns:
83
  The number of days until the future date.
 
28
 
29
  Args:
30
  city: The name of the city.
31
+ date: The date in YYY-MM-DD format.
32
  api_key: Your OpenWeatherMap API key.
33
 
34
  Returns:
 
69
  except requests.exceptions.RequestException as e:
70
  return f"Error connecting to OpenWeatherMap API: {e}"
71
  except ValueError:
72
+ return "Invalid date format. Please use YYYY-MM-DD."
73
  except KeyError:
74
  return "Weather data not available or API key is invalid"
75
 
 
77
  """Calculates the number of days until a specified future date.
78
 
79
  Args:
80
+ future_date: The future date in YYYY-MM-DD format.
81
 
82
  Returns:
83
  The number of days until the future date.