Daliny commited on
Commit
92f565c
·
1 Parent(s): 064817a

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -161,15 +161,15 @@ def flood_detection(city, ground_df = ground_df, df = df):
161
 
162
  city = gr.inputs.Dropdown(choices=list(df.City.unique()), type="value",label = "Please select a city from the list")
163
 
164
- output_lat = gr.Number(label = "Closest latitude point is")
165
- output_lon = gr.Number(label = "Closest longitude point is")
166
- output_ground = gr.Number(label = "Ground elevation")
167
  output1 = gr.outputs.Textbox(type="auto", label="Mean Sea Level Prediction in 2021-01(m)")
168
- label1 = gr.outputs.Textbox(type="auto", label="Flooding label of in 2021-01")
169
  output2 = gr.outputs.Textbox(type="auto", label="Mean Sea Level Prediction in 2021-02(m)")
170
- label2 = gr.outputs.Textbox(type="auto", label="Flooding label of in 2021-02")
171
  output3 = gr.outputs.Textbox(type="auto", label="Mean Sea Level Prediction in 2021-03(m)")
172
- label3 = gr.outputs.Textbox(type="auto", label="Flooding label of in 2021-03")
173
  output_graph = gr.Plot(type="auto")
174
  app = gr.Interface(fn=flood_detection, inputs=[city], outputs=[output_lat,output_lon,output_ground,output1,label1,output2,label2,output3,label3,output_graph],description="Please select a city to find the flooding risk label")
175
  app.launch()
 
161
 
162
  city = gr.inputs.Dropdown(choices=list(df.City.unique()), type="value",label = "Please select a city from the list")
163
 
164
+ output_lat = gr.Number(label = "Latitude")
165
+ output_lon = gr.Number(label = "Longitude")
166
+ output_ground = gr.Number(label = "Ground elevation(m)")
167
  output1 = gr.outputs.Textbox(type="auto", label="Mean Sea Level Prediction in 2021-01(m)")
168
+ label1 = gr.outputs.Textbox(type="auto", label="Flood Classification in 2021-01")
169
  output2 = gr.outputs.Textbox(type="auto", label="Mean Sea Level Prediction in 2021-02(m)")
170
+ label2 = gr.outputs.Textbox(type="auto", label="Flood Classification in 2021-02")
171
  output3 = gr.outputs.Textbox(type="auto", label="Mean Sea Level Prediction in 2021-03(m)")
172
+ label3 = gr.outputs.Textbox(type="auto", label="Flood Classification in 2021-03")
173
  output_graph = gr.Plot(type="auto")
174
  app = gr.Interface(fn=flood_detection, inputs=[city], outputs=[output_lat,output_lon,output_ground,output1,label1,output2,label2,output3,label3,output_graph],description="Please select a city to find the flooding risk label")
175
  app.launch()