Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ st.set_page_config(
|
|
37 |
|
38 |
# [Previous sections like ModelConfig, SFTDataset, ModelBuilder, Utility Functions remain unchanged...]
|
39 |
|
40 |
-
# Cargo Travel Time Tool with
|
41 |
from smolagents import tool
|
42 |
|
43 |
@tool
|
@@ -46,12 +46,12 @@ def calculate_cargo_travel_time(origin_coords: Tuple[float, float], destination_
|
|
46 |
Calculate cargo plane travel time between two coordinates using the great-circle distance.
|
47 |
|
48 |
Args:
|
49 |
-
origin_coords (Tuple[float, float]):
|
50 |
-
destination_coords (Tuple[float, float]):
|
51 |
-
cruising_speed_kmh (float):
|
52 |
|
53 |
Returns:
|
54 |
-
float:
|
55 |
"""
|
56 |
def to_radians(degrees: float) -> float:
|
57 |
return degrees * (math.pi / 180)
|
|
|
37 |
|
38 |
# [Previous sections like ModelConfig, SFTDataset, ModelBuilder, Utility Functions remain unchanged...]
|
39 |
|
40 |
+
# Cargo Travel Time Tool with Refined Docstring
|
41 |
from smolagents import tool
|
42 |
|
43 |
@tool
|
|
|
46 |
Calculate cargo plane travel time between two coordinates using the great-circle distance.
|
47 |
|
48 |
Args:
|
49 |
+
origin_coords (Tuple[float, float]): The latitude and longitude of the starting point in degrees, e.g., (42.3601, -71.0589).
|
50 |
+
destination_coords (Tuple[float, float]): The latitude and longitude of the destination in degrees, e.g., (40.7128, -74.0060).
|
51 |
+
cruising_speed_kmh (float, optional): The cruising speed of the cargo plane in kilometers per hour. Defaults to 750.0.
|
52 |
|
53 |
Returns:
|
54 |
+
float: The estimated travel time in hours, rounded to two decimal places, including takeoff and landing time.
|
55 |
"""
|
56 |
def to_radians(degrees: float) -> float:
|
57 |
return degrees * (math.pi / 180)
|