Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -44,33 +44,32 @@ with gr.Blocks() as iface:
|
|
44 |
with gr.Column():
|
45 |
state_input = gr.Textbox(label="Enter state name")
|
46 |
state_output = gr.Textbox(label="Destinations in State", lines=10)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
with gr.Column():
|
48 |
city_input = gr.Textbox(label="Enter city name")
|
|
|
49 |
city_info_output = gr.Textbox(label="City Information", lines=20)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
state_input.change(list_places_by_state, inputs=state_input, outputs=state_output)
|
52 |
-
|
53 |
-
|
54 |
-
gr.Examples(
|
55 |
-
examples=[
|
56 |
-
["Uttar Pradesh"],
|
57 |
-
["Maharashtra"],
|
58 |
-
["Rajasthan"],
|
59 |
-
["Arunachal Pradesh"],
|
60 |
-
["Assam"]
|
61 |
-
],
|
62 |
-
inputs=state_input
|
63 |
-
)
|
64 |
-
|
65 |
-
gr.Examples(
|
66 |
-
examples=[
|
67 |
-
["Agra"],
|
68 |
-
["Mumbai"],
|
69 |
-
["Jaipur"],
|
70 |
-
["Tawang"],
|
71 |
-
["Guwahati"]
|
72 |
-
],
|
73 |
-
inputs=city_input
|
74 |
-
)
|
75 |
|
76 |
iface.launch()
|
|
|
44 |
with gr.Column():
|
45 |
state_input = gr.Textbox(label="Enter state name")
|
46 |
state_output = gr.Textbox(label="Destinations in State", lines=10)
|
47 |
+
gr.Examples(
|
48 |
+
examples=[
|
49 |
+
["Uttar Pradesh"],
|
50 |
+
["Maharashtra"],
|
51 |
+
["Rajasthan"],
|
52 |
+
["Arunachal Pradesh"],
|
53 |
+
["Assam"]
|
54 |
+
],
|
55 |
+
inputs=state_input
|
56 |
+
)
|
57 |
with gr.Column():
|
58 |
city_input = gr.Textbox(label="Enter city name")
|
59 |
+
submit_button = gr.Button("Submit")
|
60 |
city_info_output = gr.Textbox(label="City Information", lines=20)
|
61 |
+
gr.Examples(
|
62 |
+
examples=[
|
63 |
+
["Agra"],
|
64 |
+
["Mumbai"],
|
65 |
+
["Jaipur"],
|
66 |
+
["Tawang"],
|
67 |
+
["Guwahati"]
|
68 |
+
],
|
69 |
+
inputs=city_input
|
70 |
+
)
|
71 |
|
72 |
state_input.change(list_places_by_state, inputs=state_input, outputs=state_output)
|
73 |
+
submit_button.click(get_city_info, inputs=city_input, outputs=city_info_output)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
iface.launch()
|