florentgbelidji HF staff commited on
Commit
4217047
·
1 Parent(s): 3352007

Fix DF map

Browse files
Files changed (1) hide show
  1. src/gradio_utils.py +2 -1
src/gradio_utils.py CHANGED
@@ -24,7 +24,8 @@ def create_map_from_markers(dataframe: pd.DataFrame) -> Map:
24
  Returns:
25
  Map: Folium map with markers.
26
  """
27
-
 
28
  f_map = Map(
29
  location=[dataframe["Latitude"].mean(), dataframe["Longitude"].mean()],
30
  zoom_start=10,
 
24
  Returns:
25
  Map: Folium map with markers.
26
  """
27
+ dataframe["Latitude"] = dataframe["Latitude"].astype(float, errors='raise')
28
+ dataframe["Longitude"] = dataframe["Longitude"].astype(float, errors='raise')
29
  f_map = Map(
30
  location=[dataframe["Latitude"].mean(), dataframe["Longitude"].mean()],
31
  zoom_start=10,