Spaces:
Sleeping
Sleeping
api test
Browse files- app.py +3 -2
- forecast_dataset.py +2 -2
app.py
CHANGED
|
@@ -7,13 +7,14 @@ import openmeteo_requests
|
|
| 7 |
import requests_cache
|
| 8 |
from retry_requests import retry
|
| 9 |
|
|
|
|
| 10 |
from forecast_api import download_data_csv
|
| 11 |
|
| 12 |
def get_weather_data():
|
| 13 |
|
| 14 |
download_data_csv()
|
| 15 |
-
|
| 16 |
-
return
|
| 17 |
|
| 18 |
data_placeholder = st.empty()
|
| 19 |
|
|
|
|
| 7 |
import requests_cache
|
| 8 |
from retry_requests import retry
|
| 9 |
|
| 10 |
+
from forecast_dataset import preprocess_function
|
| 11 |
from forecast_api import download_data_csv
|
| 12 |
|
| 13 |
def get_weather_data():
|
| 14 |
|
| 15 |
download_data_csv()
|
| 16 |
+
data = preprocess_function()
|
| 17 |
+
return data
|
| 18 |
|
| 19 |
data_placeholder = st.empty()
|
| 20 |
|
forecast_dataset.py
CHANGED
|
@@ -60,7 +60,7 @@ class ForecastMeteo(DataSet):
|
|
| 60 |
self._dataframe['T'] = self._dataframe['T'] * 10
|
| 61 |
|
| 62 |
|
| 63 |
-
|
| 64 |
preprocess = ForecastMeteo(variable="forecast")
|
| 65 |
preprocess.get_df()
|
| 66 |
-
|
|
|
|
| 60 |
self._dataframe['T'] = self._dataframe['T'] * 10
|
| 61 |
|
| 62 |
|
| 63 |
+
def preprocess_function():
|
| 64 |
preprocess = ForecastMeteo(variable="forecast")
|
| 65 |
preprocess.get_df()
|
| 66 |
+
return preprocess
|