Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
chore: clean log
Browse files Browse the repository at this point in the history
  • Loading branch information
d116626 committed Jan 14, 2024
1 parent 291a89e commit 62a8c91
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/📣 Real-time flooding detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,16 @@ def get_icon_color(label: Union[bool, None]):


for i in range(0, len(chart_data)):
ai_classification = chart_data.iloc[i].get("ai_classification", [])
if ai_classification == []:
ai_classification = [{"label": None}]
folium.Marker(
location=[chart_data.iloc[i]["latitude"], chart_data.iloc[i]["longitude"]],
# add nome_da_camera and status to tooltip
tooltip=f"""
ID: {chart_data.iloc[i]['id_camera']}""",
# change icon color according to status
icon=folium.Icon(
color=get_icon_color(
chart_data.iloc[i]["ai_classification"][0].get("label", None)
)
),
icon=folium.Icon(color=get_icon_color(ai_classification[0].get("label", None))),
# icon=folium.CustomIcon(
# icon_data["url"],
# icon_size=(icon_data["width"], icon_data["height"]),
Expand Down

0 comments on commit 62a8c91

Please sign in to comment.