Spaces:
Runtime error
Runtime error
import pickle | |
import gradio as gr | |
description = "input a single number or numbers separated with comma" | |
with open('final_model.pkl','rb') as g: | |
model = pickle.load(g) | |
def grad(value): | |
values = value.split(',') | |
values = [int(i) for i in values] | |
output = list(model.predict(values)['NOx']) | |
output = [str(i) for i in output] | |
output = "\n".join(output) | |
return output | |
gr.Interface(grad, gr.Textbox(label = 'Months'),gr.Textbox(label = "NOx pollution values(microgram/m³"), description = description, title = "Predicting NOx pollution levels for station Avda. Ramón y Cajal" ).launch() | |