Ahmed Lekssays commited on
Commit
0b0b733
1 Parent(s): c2b8e1c

remove top bar

Browse files
Files changed (1) hide show
  1. app.py +6 -145
app.py CHANGED
@@ -10,15 +10,8 @@ from streamlit_folium import st_folium
10
 
11
  from src.text_content import (
12
  COLOR_MAPPING,
13
- CREDITS_TEXT,
14
- HEADERS_MAPPING,
15
  ICON_MAPPING,
16
- INTRO_TEXT_AR,
17
- INTRO_TEXT_EN,
18
- INTRO_TEXT_FR,
19
- LOGO,
20
  REVIEW_TEXT,
21
- SLOGAN,
22
  )
23
  from src.utils import add_latlng_col, init_map, parse_gg_sheet
24
 
@@ -36,17 +29,12 @@ st.set_page_config(
36
  page_title="Nt3awnou Map نتعاونو",
37
  )
38
 
39
- # """
40
- # <style>
41
- # .block-container {
42
- # padding-top: 1rem;
43
- # padding-bottom: 0rem;
44
- # }
45
- # </style>
46
- # <div style="text-align: center;">
47
- # <img src="https://storage.googleapis.com/storage-annarabic/Nt3awnou(1).png" width="200" height="200">
48
- # </div>
49
- # """
50
 
51
  st.markdown(
52
  """
@@ -67,21 +55,6 @@ st.markdown(
67
  unsafe_allow_html=True,
68
  )
69
 
70
- # # Initialize States
71
- # if "sleep_time" not in st.session_state:
72
- # st.session_state.sleep_time = 2
73
- # if "auto_refresh" not in st.session_state:
74
- # st.session_state.auto_refresh = False
75
-
76
- # auto_refresh = st.sidebar.checkbox("Auto Refresh?", st.session_state.auto_refresh)
77
- # if auto_refresh:
78
- # number = st.sidebar.number_input(
79
- # "Refresh rate in seconds", value=st.session_state.sleep_time
80
- # )
81
- # st.session_state.sleep_time = number
82
-
83
-
84
- # Streamlit functions
85
  def display_interventions(interventions_df):
86
  """Display NGO interventions on the map"""
87
  for index, row in interventions_df.iterrows():
@@ -253,12 +226,6 @@ def id_review_submission():
253
  "Submitted at https://huggingface.co/datasets/nt3awnou/review_requests/ تم الإرسال"
254
  )
255
 
256
-
257
- # # Logo and Title
258
- # st.markdown(LOGO, unsafe_allow_html=True)
259
- # # st.title("Nt3awnou نتعاونو")
260
- # st.markdown(SLOGAN, unsafe_allow_html=True)
261
-
262
  # Load data and initialize map with plugins
263
  df = parse_gg_sheet(REQUESTS_URL)
264
  df = add_latlng_col(df, process_column=15)
@@ -277,8 +244,6 @@ options = [
277
  ]
278
  selected_options = []
279
 
280
-
281
-
282
  df["id"] = df.index
283
  filtered_df = df
284
 
@@ -288,107 +253,3 @@ display_interventions(interventions_df)
288
  show_requests(df)
289
 
290
  st_folium(m, use_container_width=True, returned_objects=[], feature_group_to_add=fg, key="map")
291
- # tab_ar, tab_en, tab_fr = st.tabs(["العربية", "English", "Français"])
292
-
293
-
294
- # with tab_en:
295
- # st.markdown(INTRO_TEXT_EN, unsafe_allow_html=True)
296
- # with tab_ar:
297
- # st.markdown(INTRO_TEXT_AR, unsafe_allow_html=True)
298
- # with tab_fr:
299
- # st.markdown(INTRO_TEXT_FR, unsafe_allow_html=True)
300
-
301
- # # Requests table
302
- # st.divider()
303
- # st.subheader("📝 **Table of requests / جدول الطلبات**")
304
- # drop_cols = [
305
- # "(عند الامكان) رقم هاتف شخص موجود في عين المكان",
306
- # "الرجاء الضغط على الرابط التالي لمعرفة موقعك إذا كان متاحا",
307
- # "GeoStamp",
308
- # "GeoCode",
309
- # "GeoAddress",
310
- # "Status",
311
- # "id",
312
- # ]
313
- # display_dataframe(filtered_df, drop_cols, REQUESTS_URL, search_id=True, for_help_requests=True)
314
-
315
- # # Interventions table
316
- # st.divider()
317
- # st.subheader("📝 **Table of interventions / جدول التدخلات**")
318
- # display_dataframe(
319
- # interventions_df,
320
- # [], # We show NGOs contact information
321
- # INTERVENTIONS_URL,
322
- # search_id=False,
323
- # status=True,
324
- # for_help_requests=False,
325
- # )
326
-
327
- # # Submit an id for review
328
- # st.divider()
329
- # id_review_submission()
330
-
331
-
332
- # # Donations can be made to the gouvernmental fund under the name
333
- # st.divider()
334
- # st.subheader("📝 **Donations / التبرعات / Dons**")
335
- # tab_ar, tab_en, tab_fr = st.tabs(["العربية", "English", "Français"])
336
- # with tab_en:
337
- # st.markdown(
338
- # """
339
- # <div style="text-align: center;">
340
- # <h4>The official bank account dedicated to tackle the consequences of the earthquake is:</h4>
341
- # <b>Account number:</b>
342
- # <h2>126</h2>
343
- # <b>RIB:</b> 001-810-0078000201106203-18
344
- # <br>
345
- # <b>For the money transfers coming from outside Morocco</b>
346
- # <br>
347
- # <b>IBAN:</b> MA64001810007800020110620318
348
- # <br>
349
- # """,
350
- # unsafe_allow_html=True,
351
- # )
352
- # with tab_ar:
353
- # st.markdown(
354
- # """
355
- # <div style="text-align: center;">
356
- # <h4>الحساب البنكي الرسمي المخصص لمواجهة عواقب الزلزال</h4>
357
- # <b>رقم الحساب</b>
358
- # <h2>126</h2>
359
- # <b>RIB:</b> 001-810-0078000201106203-18
360
- # <br>
361
- # <b>للتحويلات القادمة من خارج المغرب</b>
362
- # <br>
363
- # <b>IBAN:</b> MA64001810007800020110620318
364
- # <br>
365
- # </div>
366
- # """,
367
- # unsafe_allow_html=True,
368
- # )
369
- # with tab_fr:
370
- # st.markdown(
371
- # """
372
- # <div style="text-align: center;">
373
- # <h4>Le compte bancaire officiel dédié à la lutte contre les conséquences du séisme est le suivant:</h4>
374
- # <b>Numéro de compte:</b>
375
- # <h2>126</h2>
376
- # <b>RIB:</b> 001-810-0078000201106203-18
377
- # <br>
378
- # <b>Pour les transferts d'argent en provenance de l'étranger</b>
379
- # <br>
380
- # <b>IBAN:</b> MA64001810007800020110620318
381
- # <br>
382
- # """,
383
- # unsafe_allow_html=True,
384
- # )
385
-
386
-
387
- # # Credits
388
- # st.markdown(
389
- # CREDITS_TEXT,
390
- # unsafe_allow_html=True,
391
- # )
392
- # if auto_refresh:
393
- # time.sleep(number)
394
- # st.experimental_rerun()
 
10
 
11
  from src.text_content import (
12
  COLOR_MAPPING,
 
 
13
  ICON_MAPPING,
 
 
 
 
14
  REVIEW_TEXT,
 
15
  )
16
  from src.utils import add_latlng_col, init_map, parse_gg_sheet
17
 
 
29
  page_title="Nt3awnou Map نتعاونو",
30
  )
31
 
32
+ hide_menu_style = """
33
+ <style>
34
+ #MainMenu {visibility: hidden;}
35
+ </style>
36
+ """
37
+ st.markdown(hide_menu_style, unsafe_allow_html=True)
 
 
 
 
 
38
 
39
  st.markdown(
40
  """
 
55
  unsafe_allow_html=True,
56
  )
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  def display_interventions(interventions_df):
59
  """Display NGO interventions on the map"""
60
  for index, row in interventions_df.iterrows():
 
226
  "Submitted at https://huggingface.co/datasets/nt3awnou/review_requests/ تم الإرسال"
227
  )
228
 
 
 
 
 
 
 
229
  # Load data and initialize map with plugins
230
  df = parse_gg_sheet(REQUESTS_URL)
231
  df = add_latlng_col(df, process_column=15)
 
244
  ]
245
  selected_options = []
246
 
 
 
247
  df["id"] = df.index
248
  filtered_df = df
249
 
 
253
  show_requests(df)
254
 
255
  st_folium(m, use_container_width=True, returned_objects=[], feature_group_to_add=fg, key="map")