nouamanetazi HF staff commited on
Commit
803afe3
1 Parent(s): 0188ddf

use st metrics

Browse files
Files changed (1) hide show
  1. app.py +37 -52
app.py CHANGED
@@ -511,74 +511,59 @@ tab_ar, tab_en, tab_fr = st.tabs(["العربية", "English", "Français"])
511
 
512
  with tab_en:
513
  st.markdown(INTRO_TEXT_EN, unsafe_allow_html=True)
514
- col1, col2 = st.columns([1, 1])
515
  with col1:
516
- st.markdown(
517
- f"""
518
- <div style="text-align: center;">
519
- <h3>Number of help requests</h3>
520
- <h2>{len_requests}</h2>
521
- </div>
522
- """,
523
- unsafe_allow_html=True,
524
  )
525
  with col2:
526
- st.markdown(
527
- f"""
528
- <div style="text-align: center;">
529
- <h3>Number of interventions</h3>
530
- <h2>{len_interventions}</h2>
531
- </div>
532
- """,
533
- unsafe_allow_html=True,
534
  )
535
  with tab_ar:
536
  st.markdown(INTRO_TEXT_AR, unsafe_allow_html=True)
537
- col1, col2 = st.columns([1, 1])
538
  with col1:
539
- st.markdown(
540
- f"""
541
- <div style="text-align: center;">
542
- <h3>عدد طلبات المساعدة</h3>
543
- <h2>{len_requests}</h2>
544
- </div>
545
- """,
546
- unsafe_allow_html=True,
547
  )
548
  with col2:
549
- st.markdown(
550
- f"""
551
- <div style="text-align: center;">
552
- <h3>عدد التدخلات</h3>
553
- <h2>{len_interventions}</h2>
554
- </div>
555
- """,
556
- unsafe_allow_html=True,
557
  )
558
-
559
  with tab_fr:
560
  st.markdown(INTRO_TEXT_FR, unsafe_allow_html=True)
561
- col1, col2 = st.columns([1, 1])
562
  with col1:
563
- st.markdown(
564
- f"""
565
- <div style="text-align: center;">
566
- <h3>Nombre de demandes d'aide</h3>
567
- <h2>{len_requests}</h2>
568
- </div>
569
- """,
570
- unsafe_allow_html=True,
571
  )
572
  with col2:
573
- st.markdown(
574
- f"""
575
- <div style="text-align: center;">
576
- <h3>Nombre d'interventions</h3>
577
- <h2>{len_interventions}</h2>
578
- </div>
579
- """,
580
- unsafe_allow_html=True,
581
  )
 
582
 
583
  # Verified Requests table
584
  st.divider()
 
511
 
512
  with tab_en:
513
  st.markdown(INTRO_TEXT_EN, unsafe_allow_html=True)
514
+ col1, col2, col3 = st.columns([1, 1, 1])
515
  with col1:
516
+ st.metric(
517
+ "# Number of help requests",
518
+ len_requests,
 
 
 
 
 
519
  )
520
  with col2:
521
+ st.metric(
522
+ "# Number of interventions",
523
+ len_interventions + len_solved_verified_requests,
524
+ )
525
+ with col3:
526
+ st.metric(
527
+ "# Number of solved requests",
528
+ len_solved_verified_requests,
529
  )
530
  with tab_ar:
531
  st.markdown(INTRO_TEXT_AR, unsafe_allow_html=True)
532
+ col1, col2, col3 = st.columns([1, 1, 1])
533
  with col1:
534
+ st.metric(
535
+ "# عدد طلبات المساعدة",
536
+ len_requests,
 
 
 
 
 
537
  )
538
  with col2:
539
+ st.metric(
540
+ "# عدد التدخلات",
541
+ len_interventions + len_solved_verified_requests,
542
+ )
543
+ with col3:
544
+ st.metric(
545
+ "# عدد الطلبات المستجاب لها",
546
+ len_solved_verified_requests,
547
  )
 
548
  with tab_fr:
549
  st.markdown(INTRO_TEXT_FR, unsafe_allow_html=True)
550
+ col1, col2, col3 = st.columns([1, 1, 1])
551
  with col1:
552
+ st.metric(
553
+ "# Nombre de demandes d'aide",
554
+ len_requests,
 
 
 
 
 
555
  )
556
  with col2:
557
+ st.metric(
558
+ "# Nombre d'interventions",
559
+ len_interventions + len_solved_verified_requests,
560
+ )
561
+ with col3:
562
+ st.metric(
563
+ "# Nombre de demandes résolues",
564
+ len_solved_verified_requests,
565
  )
566
+
567
 
568
  # Verified Requests table
569
  st.divider()