Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
split review text and remove print for parsing error
Browse files
app.py
CHANGED
@@ -8,12 +8,23 @@ import requests
|
|
8 |
import streamlit as st
|
9 |
from folium import plugins
|
10 |
from huggingface_hub import HfApi
|
11 |
-
from src.text_content import (COLOR_MAPPING, CREDITS_TEXT, HEADERS_MAPPING,
|
12 |
-
ICON_MAPPING, INTRO_TEXT_AR, INTRO_TEXT_EN,
|
13 |
-
INTRO_TEXT_FR, LOGO, REVIEW_TEXT, SLOGAN)
|
14 |
-
from src.utils import init_map, parse_gg_sheet
|
15 |
from streamlit_folium import st_folium
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
TOKEN = os.environ.get("HF_TOKEN", None)
|
18 |
REQUESTS_URL = "https://docs.google.com/spreadsheets/d/1gYoBBiBo1L18IVakHkf3t1fOGvHWb23loadyFZUeHJs/edit#gid=966953708"
|
19 |
INTERVENTIONS_URL = "https://docs.google.com/spreadsheets/d/1eXOTqunOWWP8FRdENPs4cU9ulISm4XZWYJJNR1-SrwY/edit#gid=2089222765"
|
@@ -51,7 +62,6 @@ def parse_latlng_from_link(url):
|
|
51 |
latlng = url.split("@")[1].split(",")[0:2]
|
52 |
return [float(latlng[0]), float(latlng[1])]
|
53 |
except Exception as e:
|
54 |
-
print(f"Error parsing latlng from link: {e}")
|
55 |
return None
|
56 |
|
57 |
|
@@ -137,6 +147,7 @@ def id_review_submission():
|
|
137 |
"""Id review submission form"""
|
138 |
st.subheader("🔍 Review of requests")
|
139 |
st.markdown(REVIEW_TEXT)
|
|
|
140 |
|
141 |
id_to_review = st.number_input(
|
142 |
"Enter id / أدخل الرقم", min_value=0, max_value=len(df), value=0, step=1
|
|
|
8 |
import streamlit as st
|
9 |
from folium import plugins
|
10 |
from huggingface_hub import HfApi
|
|
|
|
|
|
|
|
|
11 |
from streamlit_folium import st_folium
|
12 |
|
13 |
+
from src.text_content import (
|
14 |
+
COLOR_MAPPING,
|
15 |
+
CREDITS_TEXT,
|
16 |
+
HEADERS_MAPPING,
|
17 |
+
ICON_MAPPING,
|
18 |
+
INTRO_TEXT_AR,
|
19 |
+
INTRO_TEXT_EN,
|
20 |
+
INTRO_TEXT_FR,
|
21 |
+
LOGO,
|
22 |
+
REVIEW_TEXT,
|
23 |
+
REVIEW_TEXT_2,
|
24 |
+
SLOGAN,
|
25 |
+
)
|
26 |
+
from src.utils import init_map, parse_gg_sheet
|
27 |
+
|
28 |
TOKEN = os.environ.get("HF_TOKEN", None)
|
29 |
REQUESTS_URL = "https://docs.google.com/spreadsheets/d/1gYoBBiBo1L18IVakHkf3t1fOGvHWb23loadyFZUeHJs/edit#gid=966953708"
|
30 |
INTERVENTIONS_URL = "https://docs.google.com/spreadsheets/d/1eXOTqunOWWP8FRdENPs4cU9ulISm4XZWYJJNR1-SrwY/edit#gid=2089222765"
|
|
|
62 |
latlng = url.split("@")[1].split(",")[0:2]
|
63 |
return [float(latlng[0]), float(latlng[1])]
|
64 |
except Exception as e:
|
|
|
65 |
return None
|
66 |
|
67 |
|
|
|
147 |
"""Id review submission form"""
|
148 |
st.subheader("🔍 Review of requests")
|
149 |
st.markdown(REVIEW_TEXT)
|
150 |
+
st.markdown(REVIEW_TEXT_2)
|
151 |
|
152 |
id_to_review = st.number_input(
|
153 |
"Enter id / أدخل الرقم", min_value=0, max_value=len(df), value=0, step=1
|