Spaces:
Sleeping
Sleeping
deleting unused files
Browse files- air_quality_df.pkl +0 -0
- requirements-old.txt +0 -6
- scheduler.py +0 -45
- training.py +0 -0
air_quality_df.pkl
DELETED
|
Binary file (27.8 kB)
|
|
|
requirements-old.txt
DELETED
|
@@ -1,6 +0,0 @@
|
|
| 1 |
-
#gradio-datetimerange
|
| 2 |
-
#gradio
|
| 3 |
-
hopsworks
|
| 4 |
-
pandas
|
| 5 |
-
modal
|
| 6 |
-
streamlit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scheduler.py
DELETED
|
@@ -1,45 +0,0 @@
|
|
| 1 |
-
import modal
|
| 2 |
-
|
| 3 |
-
app = modal.App('scheduler')
|
| 4 |
-
|
| 5 |
-
@app.function(schedule=modal.Period(seconds=10))
|
| 6 |
-
def update():
|
| 7 |
-
print('Updating...')
|
| 8 |
-
|
| 9 |
-
# Send dataframe to Streamlit frontend
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
@app.function()
|
| 13 |
-
def predict():
|
| 14 |
-
|
| 15 |
-
# Extract features
|
| 16 |
-
|
| 17 |
-
# Run model
|
| 18 |
-
|
| 19 |
-
print('Predicting...')
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
"""
|
| 23 |
-
project = hopsworks.login(project=project_name, api_key_value=api_key)
|
| 24 |
-
fs = project.get_feature_store()
|
| 25 |
-
secrets = util.secrets_api(project.name)
|
| 26 |
-
|
| 27 |
-
AQI_API_KEY = secrets.get_secret("AQI_API_KEY").value
|
| 28 |
-
location_str = secrets.get_secret("SENSOR_LOCATION_JSON").value
|
| 29 |
-
location = json.loads(location_str)
|
| 30 |
-
|
| 31 |
-
country=location['country']
|
| 32 |
-
city=location['city']
|
| 33 |
-
street=location['street']
|
| 34 |
-
aqicn_url=location['aqicn_url']
|
| 35 |
-
latitude=location['latitude']
|
| 36 |
-
longitude=location['longitude']
|
| 37 |
-
|
| 38 |
-
today = datetime.date.today()
|
| 39 |
-
|
| 40 |
-
# Retrieve feature groups
|
| 41 |
-
air_quality_fg = fs.get_feature_group(
|
| 42 |
-
name='air_quality',
|
| 43 |
-
version=1,
|
| 44 |
-
)
|
| 45 |
-
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
training.py
DELETED
|
File without changes
|