Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,10 +5,9 @@ import emails
|
|
5 |
from emails.template import JinjaTemplate as T
|
6 |
import openai
|
7 |
import os
|
8 |
-
import secrets
|
9 |
|
10 |
# Define your OpenWeather API key here
|
11 |
-
openweather_api_key =
|
12 |
|
13 |
# List of weather conditions and icons
|
14 |
weather_icons = {
|
@@ -93,7 +92,7 @@ def fetch_weather_condition(location, api_key):
|
|
93 |
|
94 |
def generate_suggestions(location, current_temperature, min_temp_threshold, max_temp_threshold, weather_condition):
|
95 |
|
96 |
-
openai.api_key =
|
97 |
|
98 |
if min_temp_threshold <= current_temperature <= max_temp_threshold:
|
99 |
prompt = f"Provide suggestions for someone in {location} where it's {current_temperature}°C and {weather_condition}."
|
|
|
5 |
from emails.template import JinjaTemplate as T
|
6 |
import openai
|
7 |
import os
|
|
|
8 |
|
9 |
# Define your OpenWeather API key here
|
10 |
+
openweather_api_key = "bb34b4f6362247530f4b2091d0a18a9e"
|
11 |
|
12 |
# List of weather conditions and icons
|
13 |
weather_icons = {
|
|
|
92 |
|
93 |
def generate_suggestions(location, current_temperature, min_temp_threshold, max_temp_threshold, weather_condition):
|
94 |
|
95 |
+
openai.api_key = "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"
|
96 |
|
97 |
if min_temp_threshold <= current_temperature <= max_temp_threshold:
|
98 |
prompt = f"Provide suggestions for someone in {location} where it's {current_temperature}°C and {weather_condition}."
|