Spaces:
Build error
Build error
Commit ·
d937cf5
1
Parent(s): 93a8145
Refactor Gradio interface: Update airport selector label and add maximum choices limit
Browse files
app.py
CHANGED
|
@@ -100,12 +100,11 @@ with gr.Blocks(theme=gr.themes.Default()) as demo:
|
|
| 100 |
# Place components in two columns for results and map
|
| 101 |
with gr.Row():
|
| 102 |
with gr.Column():
|
| 103 |
-
airport_selector = gr.Dropdown(airport_options, multiselect=True, label="Select Airports (IATA - Name)", value=["JFK - John F Kennedy Intl - United States", "SIN - Changi Intl - Singapore", "LHR - Heathrow - United Kingdom"])
|
| 104 |
aircraft_selector = gr.Dropdown(aircraft_options, label="Select Aircraft Type", value="Airbus A350-900")
|
| 105 |
check_button = gr.Button("Check Route Feasibility")
|
| 106 |
gr.Markdown("## Route Map")
|
| 107 |
map_output = gr.HTML(label="Interactive Route Map with Refueling Sectors")
|
| 108 |
-
|
| 109 |
with gr.Column():
|
| 110 |
result_output = gr.HTML(label="Feasibility Result (Route, Fuel, Refueling Info)")
|
| 111 |
|
|
|
|
| 100 |
# Place components in two columns for results and map
|
| 101 |
with gr.Row():
|
| 102 |
with gr.Column():
|
| 103 |
+
airport_selector = gr.Dropdown(airport_options, multiselect=True, label="Select Airports (IATA - Name) (Max 5 Choices)", value=["JFK - John F Kennedy Intl - United States", "SIN - Changi Intl - Singapore", "LHR - Heathrow - United Kingdom"], max_choices=5)
|
| 104 |
aircraft_selector = gr.Dropdown(aircraft_options, label="Select Aircraft Type", value="Airbus A350-900")
|
| 105 |
check_button = gr.Button("Check Route Feasibility")
|
| 106 |
gr.Markdown("## Route Map")
|
| 107 |
map_output = gr.HTML(label="Interactive Route Map with Refueling Sectors")
|
|
|
|
| 108 |
with gr.Column():
|
| 109 |
result_output = gr.HTML(label="Feasibility Result (Route, Fuel, Refueling Info)")
|
| 110 |
|