Only show the results if they exist
Browse files
app.py
CHANGED
@@ -86,26 +86,27 @@ with tab1:
|
|
86 |
"F1 score": macro_avg_f1,
|
87 |
}
|
88 |
)
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
|
|
109 |
|
110 |
with st.expander("Click for more information."):
|
111 |
with open("leaderboard_info.md", "r") as f:
|
|
|
86 |
"F1 score": macro_avg_f1,
|
87 |
}
|
88 |
)
|
89 |
+
if evaluation_metrics:
|
90 |
+
results_df = pd.DataFrame(evaluation_metrics).sort_values(
|
91 |
+
"F1 score", ascending=False
|
92 |
+
)
|
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[
|
100 |
+
["Rank", "Model Name", "Accuracy", "Recall", "Precision", "F1 score", "URL"]
|
101 |
+
]
|
102 |
+
st.data_editor(
|
103 |
+
results_df,
|
104 |
+
column_config={
|
105 |
+
"URL": st.column_config.LinkColumn("URL"),
|
106 |
+
},
|
107 |
+
hide_index=True,
|
108 |
+
)
|
109 |
+
st.write("Note: The metrics are macro-averaged across all dialects.")
|
110 |
|
111 |
with st.expander("Click for more information."):
|
112 |
with open("leaderboard_info.md", "r") as f:
|