Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -86,17 +86,17 @@ def get_route_and_medical_centers(source_location, destination_location, medical
|
|
86 |
route_info.append("Could not retrieve location coordinates.")
|
87 |
|
88 |
# Return both the route info and the map
|
89 |
-
return "\n".join(route_info), m
|
90 |
|
91 |
-
# Gradio UI components
|
92 |
-
source_location_input = gr.
|
93 |
-
destination_location_input = gr.
|
94 |
-
medical_center_query_input = gr.
|
95 |
-
location_input = gr.
|
96 |
|
97 |
-
# Output components
|
98 |
-
route_info_output = gr.
|
99 |
-
map_output = gr.
|
100 |
|
101 |
# Create Gradio interface
|
102 |
iface = gr.Interface(
|
|
|
86 |
route_info.append("Could not retrieve location coordinates.")
|
87 |
|
88 |
# Return both the route info and the map
|
89 |
+
return "\n".join(route_info), m._repr_html_()
|
90 |
|
91 |
+
# Gradio UI components (Updated for Gradio v3.x)
|
92 |
+
source_location_input = gr.Textbox(default="Honolulu, HI", label="Source Location")
|
93 |
+
destination_location_input = gr.Textbox(default="Maui, HI", label="Destination Location")
|
94 |
+
medical_center_query_input = gr.Textbox(default="Hawaii Medical Center", label="Medical Center Query")
|
95 |
+
location_input = gr.Textbox(default="Honolulu, HI", label="Your Location")
|
96 |
|
97 |
+
# Output components (Updated for Gradio v3.x)
|
98 |
+
route_info_output = gr.Textbox(label="Driving Directions")
|
99 |
+
map_output = gr.HTML(label="Map with Route and Medical Centers")
|
100 |
|
101 |
# Create Gradio interface
|
102 |
iface = gr.Interface(
|