Spaces:
Sleeping
Sleeping
File size: 570 Bytes
970e332 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import gradio as gr
import pickle
ridge_model = pickle.load(open("models/ridge.pkl","rb"))
standard_scaler = pickle.load(open("models/scaler.pkl","rb"))
def predict(temperature, rh, ws, rain, ffmc, dmc, isi, classes, region):
new_data_scaled = standard_scaler.transform([[temperature,rh,ws,rain,ffmc,dmc,isi,classes,region]])
result = ridge_model.predict(new_data_scaled) # result stores in list format
return result
iface = gr.Interface(fn=predict, inputs=["text","text","text","text","text","text","text","text","text"], outputs="text")
iface.launch() |