Spaces:
Runtime error
Runtime error
Campfireman
commited on
Commit
•
62cfbd8
1
Parent(s):
4a8dd38
Update app.py
Browse files
app.py
CHANGED
@@ -28,14 +28,6 @@ def greet(total_pred_days):
|
|
28 |
return str1
|
29 |
count = count + 1
|
30 |
|
31 |
-
# Get weather data
|
32 |
-
fs = project.get_feature_store()
|
33 |
-
print("get the store")
|
34 |
-
feature_view = fs.get_feature_view(
|
35 |
-
name = 'weathernew_fv',
|
36 |
-
version = 1
|
37 |
-
)
|
38 |
-
|
39 |
X = pd.DataFrame()
|
40 |
|
41 |
for i in range(count+1):
|
@@ -115,9 +107,20 @@ model2 = joblib.load(model_dir2+ "/model_tempmin_new.pkl")
|
|
115 |
|
116 |
########################################################
|
117 |
# Gradio Interface
|
118 |
-
demo = gr.Interface(fn=greet, inputs = "text", outputs="text")
|
119 |
-
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
|
122 |
if __name__ == "__main__":
|
123 |
demo.launch()
|
|
|
28 |
return str1
|
29 |
count = count + 1
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
X = pd.DataFrame()
|
32 |
|
33 |
for i in range(count+1):
|
|
|
107 |
|
108 |
########################################################
|
109 |
# Gradio Interface
|
110 |
+
#demo = gr.Interface(fn=greet, inputs = "text", outputs="text")
|
|
|
111 |
|
112 |
+
with gr.Blocks() as demo:
|
113 |
+
with gr.Row():
|
114 |
+
with gr.Column():
|
115 |
+
days = gr.Slider(
|
116 |
+
label="How many days do you want to predict the temperature of? ", value=1, minimum=1, maximum=15, step=1
|
117 |
+
)
|
118 |
+
gr.Textbox(
|
119 |
+
output,
|
120 |
+
label="Predicted results: ",
|
121 |
+
)
|
122 |
+
|
123 |
+
days.change(greet, days, output)
|
124 |
|
125 |
if __name__ == "__main__":
|
126 |
demo.launch()
|