Spaces:
Sleeping
Sleeping
Commit
·
f393e1f
1
Parent(s):
a9de22e
Refactor flight route UI and main script: Update airport options and add note about dataset limitations
Browse files
README.md
CHANGED
@@ -18,8 +18,9 @@ license: mit
|
|
18 |
|
19 |
This project focuses on optimizing flight routes to minimize travel time and costs using advanced algorithms and data analysis techniques.
|
20 |
|
21 |
-
|
22 |
|
|
|
23 |
- Efficient route calculation
|
24 |
- Cost optimization
|
25 |
|
|
|
18 |
|
19 |
This project focuses on optimizing flight routes to minimize travel time and costs using advanced algorithms and data analysis techniques.
|
20 |
|
21 |
+
> **Note:** The actual flight time and performance may vary since the dataset used is very rudimentary. In the real world, the same aircraft can have different internal configurations, leading to variations in flight time and fuel consumption.
|
22 |
|
23 |
+
## Features
|
24 |
- Efficient route calculation
|
25 |
- Cost optimization
|
26 |
|
app.py
CHANGED
@@ -8,7 +8,7 @@ from weather import *
|
|
8 |
airport_df = pd.read_parquet(r'airport.parquet') # Adjust the path to your Parquet file
|
9 |
aircraft_df = pd.read_csv(r'aircraft.csv') # Adjust the path to your CSV file
|
10 |
|
11 |
-
airport_options = [f"{row['IATA']} - {row['Airport_Name']}" for _, row in airport_df.iterrows()]
|
12 |
airports_dict = {row['IATA']: row['Airport_Name'] for _, row in airport_df.iterrows()} # For map display
|
13 |
|
14 |
# Ensure the correct column is used for aircraft types
|
@@ -75,6 +75,8 @@ with gr.Blocks(theme=gr.themes.Default()) as demo:
|
|
75 |
inputs=[airport_selector, aircraft_selector],
|
76 |
outputs=[result_output, map_output]
|
77 |
)
|
|
|
|
|
78 |
|
79 |
# Launch the Gradio app
|
80 |
demo.launch()
|
|
|
8 |
airport_df = pd.read_parquet(r'airport.parquet') # Adjust the path to your Parquet file
|
9 |
aircraft_df = pd.read_csv(r'aircraft.csv') # Adjust the path to your CSV file
|
10 |
|
11 |
+
airport_options = [f"{row['IATA']} - {row['Airport_Name']} - {row['Country']}" for _, row in airport_df.iterrows()]
|
12 |
airports_dict = {row['IATA']: row['Airport_Name'] for _, row in airport_df.iterrows()} # For map display
|
13 |
|
14 |
# Ensure the correct column is used for aircraft types
|
|
|
75 |
inputs=[airport_selector, aircraft_selector],
|
76 |
outputs=[result_output, map_output]
|
77 |
)
|
78 |
+
|
79 |
+
gr.Markdown("**Note:** The actual flight time and performance may vary since the dataset used is very rudimentary. In the real world, the same aircraft can have different internal configurations, leading to variations in flight time and fuel consumption.")
|
80 |
|
81 |
# Launch the Gradio app
|
82 |
demo.launch()
|