Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,10 @@ import requests
|
|
2 |
import openai
|
3 |
import gradio as gr
|
4 |
import re
|
|
|
5 |
|
|
|
|
|
6 |
|
7 |
def get_weather(city):
|
8 |
url = f"http://api.openweathermap.org/data/2.5/weather?q={city}&appid={OPENWEATHER_API_KEY}&units=metric"
|
|
|
2 |
import openai
|
3 |
import gradio as gr
|
4 |
import re
|
5 |
+
import os
|
6 |
|
7 |
+
OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY")
|
8 |
+
OPENWEATHER_API_KEY = os.environ.get("OPENWEATHER_API_KEY")
|
9 |
|
10 |
def get_weather(city):
|
11 |
url = f"http://api.openweathermap.org/data/2.5/weather?q={city}&appid={OPENWEATHER_API_KEY}&units=metric"
|