WayneLinn's picture
Upload 2 files
bc7d5f7
raw
history blame
693 Bytes
import gradio as gr
import numpy as np
from PIL import Image
import requests
import hopsworks
import joblib
project = hopsworks.login(project="test42")
fs = project.get_feature_store()
dataset_api = project.get_dataset_api()
def update():
dataset_api.download("Resources/aqi_results.csv")
aqi = pd.read_csv('aqi_results.csv')
return aqi
with gr.Blocks() as demo:
gr.Markdown("Air Quality Index Prediction")
with gr.Row():
with gr.Column():
gr.Label("Predicted AQI in next 7 days in Singapore")
out = gr.Dataframe()
btn = gr.Button("Refresh")
btn.click(fn=update, inputs=None, outputs=out)
if __name__ == "__main__":
demo.launch()