import gradio as gr import hopsworks import joblib import pandas as pd import numpy as np import json import time from datetime import timedelta, datetime from functions import * project = hopsworks.login() start_date = datetime.now() - timedelta(days=1) start_time = int(start_date.timestamp()) * 1000 X = pd.read_csv('x.csv') X = X.drop(columns=["date"]).fillna(0) X=X.drop(df.columns[0],axis=1) print(gb.predict(df)[:7]) mr = project.get_model_registry() model = mr.get_model("gradient_boost_paris_model", version=1) model_dir = model.download() model = joblib.load(model_dir + "/model.pkl") preds = model.predict(X) demo = gr.Interface(fn=air_quality, title="Air quality predictor", description="Input a value to get next weeks AQI prediction for Paris", inputs="text", outputs="text") if __name__ == "__main__": demo.launch()