Spaces:
Runtime error
Runtime error
Commit
·
42d83db
1
Parent(s):
ebf1891
Upload app.py
Browse files
app.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
description = "input a single number or numbers seperated with comma"
|
2 |
+
with open('final_model.pkl','rb') as g:
|
3 |
+
model = pickle.load(g)
|
4 |
+
def grad(value):
|
5 |
+
values = value.split(',')
|
6 |
+
values = [int(i) for i in values]
|
7 |
+
output = list(model.predict(values)['NOx'])
|
8 |
+
output = [str(i) for i in output]
|
9 |
+
output = "\n".join(output)
|
10 |
+
return output
|
11 |
+
|
12 |
+
|
13 |
+
gr.Interface(grad, gr.Textbox(label = 'Months'),gr.Textbox(label = "NOx pollution values"), description = description, title = "Predicting NOx pollution levels for station Avda. Ramón y Cajal" ).launch()
|