Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
|
@@ -95,8 +95,8 @@ def draw(city, df = df):
|
|
| 95 |
pred_2nd = pred[-1][1]
|
| 96 |
pred_3rd = pred[-1][2]
|
| 97 |
diff1 = pred_1st -last_y
|
| 98 |
-
diff2 = pred_2nd-
|
| 99 |
-
diff3 = pred_3rd -
|
| 100 |
fig = plt.figure()
|
| 101 |
|
| 102 |
|
|
@@ -117,11 +117,11 @@ def draw(city, df = df):
|
|
| 117 |
|
| 118 |
output = gr.outputs.Plot(type="auto")
|
| 119 |
output1 = gr.outputs.Textbox(type="auto", label="Mean Sea Level Prediction in 2021-01(m)")
|
| 120 |
-
diff_output1 = gr.outputs.Textbox(type="auto", label="Mean Sea Level Difference
|
| 121 |
output2 = gr.outputs.Textbox(type="auto", label="Mean Sea Level Prediction in 2021-02(m)")
|
| 122 |
-
diff_output2 = gr.outputs.Textbox(type="auto", label="Mean Sea Level Difference
|
| 123 |
output3 = gr.outputs.Textbox(type="auto", label="Mean Sea Level Prediction in 2021-03(m)")
|
| 124 |
-
diff_output3 = gr.outputs.Textbox(type="auto", label="Mean Sea Level Difference
|
| 125 |
dropdown = gr.inputs.Dropdown(choices=list(df.City.unique()), type="value", default=None, label=None, optional=False)
|
| 126 |
|
| 127 |
app = gr.Interface(fn=draw, inputs=[dropdown], outputs=[output,output1,diff_output1,output2,diff_output2,output3,diff_output3],description="This model is only capable of predicting mean sea level in next three month based on historical data from 2000 to 2020")
|
|
|
|
| 95 |
pred_2nd = pred[-1][1]
|
| 96 |
pred_3rd = pred[-1][2]
|
| 97 |
diff1 = pred_1st -last_y
|
| 98 |
+
diff2 = pred_2nd-pred_1st
|
| 99 |
+
diff3 = pred_3rd -pred_2nd
|
| 100 |
fig = plt.figure()
|
| 101 |
|
| 102 |
|
|
|
|
| 117 |
|
| 118 |
output = gr.outputs.Plot(type="auto")
|
| 119 |
output1 = gr.outputs.Textbox(type="auto", label="Mean Sea Level Prediction in 2021-01(m)")
|
| 120 |
+
diff_output1 = gr.outputs.Textbox(type="auto", label="Mean Sea Level Difference from previous month(m)")
|
| 121 |
output2 = gr.outputs.Textbox(type="auto", label="Mean Sea Level Prediction in 2021-02(m)")
|
| 122 |
+
diff_output2 = gr.outputs.Textbox(type="auto", label="Mean Sea Level Difference from previous month(m)")
|
| 123 |
output3 = gr.outputs.Textbox(type="auto", label="Mean Sea Level Prediction in 2021-03(m)")
|
| 124 |
+
diff_output3 = gr.outputs.Textbox(type="auto", label="Mean Sea Level Difference from previous month(m)")
|
| 125 |
dropdown = gr.inputs.Dropdown(choices=list(df.City.unique()), type="value", default=None, label=None, optional=False)
|
| 126 |
|
| 127 |
app = gr.Interface(fn=draw, inputs=[dropdown], outputs=[output,output1,diff_output1,output2,diff_output2,output3,diff_output3],description="This model is only capable of predicting mean sea level in next three month based on historical data from 2000 to 2020")
|