Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -576,9 +576,14 @@ def show_temperature_graph(data):
|
|
| 576 |
if 'weather_forecast' not in st.session_state:
|
| 577 |
client = OpenAI(
|
| 578 |
api_key="glhf_9ea0e0babe1e45353dd03b44cb979e22",
|
| 579 |
-
base_url="https://glhf.chat/api/openai/v1"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 580 |
)
|
| 581 |
|
|
|
|
| 582 |
forecast_data_str = "\n".join([f"{time}: {temp}도, {description}" for time, temp, description in zip(times, temps, weather_descriptions)])
|
| 583 |
|
| 584 |
response = client.chat.completions.create(
|
|
|
|
| 576 |
if 'weather_forecast' not in st.session_state:
|
| 577 |
client = OpenAI(
|
| 578 |
api_key="glhf_9ea0e0babe1e45353dd03b44cb979e22",
|
| 579 |
+
base_url="https://glhf.chat/api/openai/v1",
|
| 580 |
+
http_client=httpx.Client(
|
| 581 |
+
follow_redirects=True,
|
| 582 |
+
timeout=30.0
|
| 583 |
+
)
|
| 584 |
)
|
| 585 |
|
| 586 |
+
|
| 587 |
forecast_data_str = "\n".join([f"{time}: {temp}도, {description}" for time, temp, description in zip(times, temps, weather_descriptions)])
|
| 588 |
|
| 589 |
response = client.chat.completions.create(
|