nouamanetazi HF staff commited on
Commit
366b82f
1 Parent(s): d2eac8a

quick fixes

Browse files
Files changed (3) hide show
  1. app.py +1 -1
  2. src/text_content.py +1 -1
  3. src/utils.py +1 -1
app.py CHANGED
@@ -106,7 +106,7 @@ def show_requests(filtered_df):
106
  maps_url = f"https://maps.google.com/?q={long_lat}"
107
  # we display all requests in popup text and use the first one for the icon/color
108
  display_text = f'<b>Request Type:</b> {request_type}<br><b>Id:</b> {row["id"]}<br><a href="{maps_url}" target="_blank" rel="noopener noreferrer"><b>Google Maps</b></a>'
109
- icon_name = ICON_MAPPING.get(request_type, "asterisk")
110
  if row["latlng"] is None:
111
  continue
112
 
 
106
  maps_url = f"https://maps.google.com/?q={long_lat}"
107
  # we display all requests in popup text and use the first one for the icon/color
108
  display_text = f'<b>Request Type:</b> {request_type}<br><b>Id:</b> {row["id"]}<br><a href="{maps_url}" target="_blank" rel="noopener noreferrer"><b>Google Maps</b></a>'
109
+ icon_name = ICON_MAPPING.get(request_type, "list")
110
  if row["latlng"] is None:
111
  continue
112
 
src/text_content.py CHANGED
@@ -53,7 +53,7 @@ HEADERS_MAPPING = {
53
  "مساعدة طبية": "Medical Assistance | مساعدة طبية | Assistance médicale",
54
  "مأوى": "Shelter | مأوى | Abri",
55
  "طعام وماء": "Food & Water | طعام وماء | Nourriture et eau",
56
- "مخاطر (تسرب الغاز، تلف في الخدمات العامة...)": "Danger | مخاطر (تسرب الغاز، تلف في الخدمات العامة...) | Danger",
57
  }
58
 
59
  COLOR_MAPPING = {
 
53
  "مساعدة طبية": "Medical Assistance | مساعدة طبية | Assistance médicale",
54
  "مأوى": "Shelter | مأوى | Abri",
55
  "طعام وماء": "Food & Water | طعام وماء | Nourriture et eau",
56
+ "مخاطر (تسرب الغاز، تلف في الخدمات العامة...)": "Danger | مخاطر | Danger",
57
  }
58
 
59
  COLOR_MAPPING = {
src/utils.py CHANGED
@@ -1,3 +1,4 @@
 
1
  from typing import Union
2
  import folium
3
  import pandas as pd
@@ -52,7 +53,6 @@ def add_latlng_col(df, process_column: Union[str, int]):
52
  return df
53
 
54
  # parse latlng (column 4) to [lat, lng]
55
- import re
56
  def parse_latlng(latlng):
57
  if pd.isna(latlng):
58
  return None
 
1
+ import re
2
  from typing import Union
3
  import folium
4
  import pandas as pd
 
53
  return df
54
 
55
  # parse latlng (column 4) to [lat, lng]
 
56
  def parse_latlng(latlng):
57
  if pd.isna(latlng):
58
  return None