AMR-KELEG commited on
Commit
6ebedb7
·
1 Parent(s): b85527f

Fix the models' URLs

Browse files
Files changed (1) hide show
  1. app.py +13 -15
app.py CHANGED
@@ -25,6 +25,11 @@ st.write(
25
  "the first multi-label country-level ADI dataset."
26
  )
27
 
 
 
 
 
 
28
  tab1, tab2 = st.tabs(["Leaderboard", "Submit a Model"])
29
  with tab1:
30
  # Load the labels
@@ -86,27 +91,20 @@ with tab1:
86
  "Recall": macro_avg_recall,
87
  "Precision": macro_avg_precision,
88
  "F1 score": macro_avg_f1,
 
 
 
 
 
 
89
  }
90
  )
 
91
  if evaluation_metrics:
92
  results_df = pd.DataFrame(evaluation_metrics).sort_values(
93
  "F1 score", ascending=False
94
  )
95
  results_df["Rank"] = range(1, len(results_df) + 1)
96
- results_df["URL"] = [
97
- f"https://huggingface.co/{row['model_name']}"
98
- if (
99
- row["status"] == "completed"
100
- and "shared task team" not in row["model_name"]
101
- )
102
- else "N/A"
103
- for row in model_predictions_rows
104
- ]
105
- results_df["Commit ID"] = [
106
- row["commit_id"][:5]
107
- for row in model_predictions_rows
108
- if row["status"] == "completed"
109
- ]
110
 
111
  results_df = results_df[
112
  [
@@ -123,7 +121,7 @@ with tab1:
123
  st.data_editor(
124
  results_df,
125
  column_config={
126
- "URL": st.column_config.LinkColumn("URL"),
127
  },
128
  hide_index=True,
129
  )
 
25
  "the first multi-label country-level ADI dataset."
26
  )
27
 
28
+ SHARED_TASK_TEAMS = {
29
+ "Elyadata": "https://aclanthology.org/2024.arabicnlp-1.85/",
30
+ "NLP_DI": "https://aclanthology.org/2024.arabicnlp-1.82/",
31
+ "dzNlp": "https://aclanthology.org/2024.arabicnlp-1.84/",
32
+ }
33
  tab1, tab2 = st.tabs(["Leaderboard", "Submit a Model"])
34
  with tab1:
35
  # Load the labels
 
91
  "Recall": macro_avg_recall,
92
  "Precision": macro_avg_precision,
93
  "F1 score": macro_avg_f1,
94
+ "URL": f"https://huggingface.co/{row['model_name']}"
95
+ if ("shared task team" not in row["model_name"])
96
+ else SHARED_TASK_TEAMS[row["model_name"].split(" (")[0]],
97
+ "Commit ID": row["commit_id"][:5]
98
+ if ("shared task team" not in row["model_name"])
99
+ else "N/A",
100
  }
101
  )
102
+
103
  if evaluation_metrics:
104
  results_df = pd.DataFrame(evaluation_metrics).sort_values(
105
  "F1 score", ascending=False
106
  )
107
  results_df["Rank"] = range(1, len(results_df) + 1)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
 
109
  results_df = results_df[
110
  [
 
121
  st.data_editor(
122
  results_df,
123
  column_config={
124
+ "URL": st.column_config.LinkColumn("URL", required=False),
125
  },
126
  hide_index=True,
127
  )