Fix another tiny bug
Browse files
app.py
CHANGED
|
@@ -15,12 +15,13 @@ import pandas as pd
|
|
| 15 |
from sklearn.metrics import accuracy_score, f1_score, recall_score, precision_score
|
| 16 |
|
| 17 |
from huggingface_hub import HfApi
|
|
|
|
| 18 |
api = HfApi()
|
| 19 |
|
| 20 |
st.title("NADI 2024 Leaderboard")
|
| 21 |
st.write(
|
| 22 |
"This leaderboard serves as a public interface for benchmarking Arabic Dialect Identification (ADI) "
|
| 23 |
-
"models using the NADI 2024 dataset, "
|
| 24 |
"the first multi-label country-level ADI dataset."
|
| 25 |
)
|
| 26 |
|
|
@@ -44,6 +45,7 @@ with tab1:
|
|
| 44 |
model_predictions_rows = []
|
| 45 |
|
| 46 |
if model_predictions_rows:
|
|
|
|
| 47 |
evaluation_metrics = []
|
| 48 |
for row in model_predictions_rows:
|
| 49 |
# Evaluate the models
|
|
@@ -93,7 +95,7 @@ with tab1:
|
|
| 93 |
results_df["Rank"] = range(1, len(results_df) + 1)
|
| 94 |
results_df["URL"] = [
|
| 95 |
f"https://huggingface.co/{row['model_name']}"
|
| 96 |
-
for row in model_predictions_rows
|
| 97 |
]
|
| 98 |
|
| 99 |
results_df = results_df[
|
|
|
|
| 15 |
from sklearn.metrics import accuracy_score, f1_score, recall_score, precision_score
|
| 16 |
|
| 17 |
from huggingface_hub import HfApi
|
| 18 |
+
|
| 19 |
api = HfApi()
|
| 20 |
|
| 21 |
st.title("NADI 2024 Leaderboard")
|
| 22 |
st.write(
|
| 23 |
"This leaderboard serves as a public interface for benchmarking Arabic Dialect Identification (ADI) "
|
| 24 |
+
"models using an 'extended version' of the NADI 2024 dataset, "
|
| 25 |
"the first multi-label country-level ADI dataset."
|
| 26 |
)
|
| 27 |
|
|
|
|
| 45 |
model_predictions_rows = []
|
| 46 |
|
| 47 |
if model_predictions_rows:
|
| 48 |
+
# TODO: Store these metrics in a separate dataset!
|
| 49 |
evaluation_metrics = []
|
| 50 |
for row in model_predictions_rows:
|
| 51 |
# Evaluate the models
|
|
|
|
| 95 |
results_df["Rank"] = range(1, len(results_df) + 1)
|
| 96 |
results_df["URL"] = [
|
| 97 |
f"https://huggingface.co/{row['model_name']}"
|
| 98 |
+
for row in model_predictions_rows if row["status"] == "completed"
|
| 99 |
]
|
| 100 |
|
| 101 |
results_df = results_df[
|