Spaces:
Runtime error
Runtime error
Download app.py from LawalAfeez/teamTensorflowWeatherPrediction: direct link, hf CLI and curl.
- Browser
- Download file 613 Bytes
-
https://huggingface.co/spaces/LawalAfeez/teamTensorflowWeatherPrediction/resolve/main/app.py
- Command line
-
hf download hf://spaces/LawalAfeez/teamTensorflowWeatherPrediction/app.py
-
curl -L -o app.py https://huggingface.co/spaces/LawalAfeez/teamTensorflowWeatherPrediction/resolve/main/app.py
613 Bytes
| 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() | |