Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -109,14 +109,72 @@ def build_leaderboard_tab(leaderboard_table_file1, leaderboard_table_file2, show
|
|
109 |
wrap=True,
|
110 |
)
|
111 |
|
112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
with gr.Tab("π
Benchmark 2", id=1):
|
115 |
arena_table_vals = get_arena_table(model_table_df2)
|
116 |
md = make_arena_leaderboard_md(len(arena_table_vals))
|
117 |
gr.Markdown(md, elem_id="leaderboard_markdown")
|
118 |
-
|
119 |
-
# Remove height argument
|
120 |
gr.Dataframe(
|
121 |
headers=[
|
122 |
"Model",
|
@@ -136,13 +194,19 @@ def build_leaderboard_tab(leaderboard_table_file1, leaderboard_table_file2, show
|
|
136 |
],
|
137 |
value=arena_table_vals,
|
138 |
elem_id="arena_leaderboard_dataframe",
|
|
|
139 |
column_widths=[200, 150, 150, 130, 100, 140],
|
140 |
wrap=True,
|
141 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
else:
|
143 |
-
|
144 |
-
|
145 |
-
return [md_1, plot_1, plot_2]
|
146 |
|
147 |
block_css = """
|
148 |
#notice_markdown {
|
|
|
109 |
wrap=True,
|
110 |
)
|
111 |
|
112 |
+
# Displaying a note about the leaderboard analysis
|
113 |
+
gr.Markdown(
|
114 |
+
f"""Note: Upon reviewing the leaderboard, it's evident that two models, Gemini and OpenHermes, outperform the others. Our next step involves a detailed analysis and comparison of the results obtained by these two models.""",
|
115 |
+
elem_id="leaderboard_markdown"
|
116 |
+
)
|
117 |
+
|
118 |
+
# Displaying additional statistics for Gemini and OpenHermes
|
119 |
+
gr.Markdown(
|
120 |
+
f"""## More Statistics for Gemini and OpenHermes\n
|
121 |
+
Now we will focus on Gemini and OpenHermes, diving deeper into their performance for a comprehensive comparison.""",
|
122 |
+
elem_id=0
|
123 |
+
)
|
124 |
+
|
125 |
+
# Displaying the confusion matrices for Gemini and OpenHermes
|
126 |
+
with gr.Row():
|
127 |
+
with gr.Column():
|
128 |
+
gr.Markdown(
|
129 |
+
"#### Figure 1: Gemini Confusion Matrix"
|
130 |
+
)
|
131 |
+
plot_1 = gr.Image("./Benchmark1/gemini_cm.png", show_label=False)
|
132 |
+
# Detailed analysis of Gemini's performance
|
133 |
+
gr.Markdown(
|
134 |
+
"""### True Positives:
|
135 |
+
Our model correctly identified all 18 pages lacking the desired information (Payment product, FeeTier, and Rate).
|
136 |
+
|
137 |
+
### True Negatives:
|
138 |
+
The model successfully predicted desired information on 39 out of 41 pages with an accuracy ranging from 12% to 100%. (For more details about accuracy, check the Notebook [here](https://huggingface.co/spaces/Effyis/LLms-Benchmark/blob/main/Benchmark1/gemini.ipynb))
|
139 |
+
|
140 |
+
### False Negatives:
|
141 |
+
In 2 instances, the model incorrectly predicted that pages lacked the desired information when they actually contained it.
|
142 |
+
|
143 |
+
### False Positives:
|
144 |
+
The model incorrectly predicted that 0 pages contained the desired information when they were actually missing it."""
|
145 |
+
)
|
146 |
+
|
147 |
+
with gr.Column():
|
148 |
+
gr.Markdown(
|
149 |
+
"#### Figure 2: OpenHermes Confusion Matrix"
|
150 |
+
)
|
151 |
+
plot_2 = gr.Image("./Benchmark1/openhermes_cm.png", show_label=False)
|
152 |
+
# Detailed analysis of OpenHermes's performance
|
153 |
+
gr.Markdown(
|
154 |
+
"""### True Positives:
|
155 |
+
Our model correctly identified 12 out of 18 pages lacking the desired information (Payment product, FeeTier, and Rate).
|
156 |
+
|
157 |
+
### True Negatives:
|
158 |
+
The model successfully predicted desired information on 21 out of 41 pages with an accuracy ranging from 5% to 66%. (For more details about accuracy, check the Notebook [here](https://huggingface.co/spaces/Effyis/LLms-Benchmark/blob/main/Benchmark1/openhermes.ipynb))
|
159 |
|
160 |
+
### False Negatives:
|
161 |
+
In 20 instances, the model incorrectly predicted that pages lacked the desired information when they actually contained it.
|
162 |
+
|
163 |
+
### False Positives:
|
164 |
+
The model incorrectly predicted that 6 pages contained the desired information when they were actually missing it."""
|
165 |
+
)
|
166 |
+
|
167 |
+
# Conclusion based on the analysis
|
168 |
+
gr.Markdown(
|
169 |
+
"""## Conclusion\n
|
170 |
+
Upon analyzing the performance of Gemini and OpenHermes, it becomes evident that both models exhibit strengths and weaknesses. Gemini demonstrates higher accuracy in identifying pages lacking desired information and also performs better in predicting pages containing the desired information. On the other hand, while OpenHermes shows good results in identifying pages lacking desired information, it achieves only 50% accuracy in predicting pages containing the desired information. Further fine-tuning of both models could lead to enhanced overall performance."""
|
171 |
+
)
|
172 |
+
|
173 |
+
|
174 |
with gr.Tab("π
Benchmark 2", id=1):
|
175 |
arena_table_vals = get_arena_table(model_table_df2)
|
176 |
md = make_arena_leaderboard_md(len(arena_table_vals))
|
177 |
gr.Markdown(md, elem_id="leaderboard_markdown")
|
|
|
|
|
178 |
gr.Dataframe(
|
179 |
headers=[
|
180 |
"Model",
|
|
|
194 |
],
|
195 |
value=arena_table_vals,
|
196 |
elem_id="arena_leaderboard_dataframe",
|
197 |
+
height=700,
|
198 |
column_widths=[200, 150, 150, 130, 100, 140],
|
199 |
wrap=True,
|
200 |
+
)
|
201 |
+
# gr.Markdown(
|
202 |
+
# f"""
|
203 |
+
# Note: For this benchmark, only a sample of 100 points from the dataset is utilized. It's evident that the data context is straightforward, yet it includes Arabic names. This could explain the lower performance scores of the models, as they may lack robust capabilities in handling Arabic names.""",
|
204 |
+
# elem_id="leaderboard_markdown"
|
205 |
+
# )
|
206 |
+
|
207 |
else:
|
208 |
+
pass
|
209 |
+
return [md_1,plot_1, plot_2]
|
|
|
210 |
|
211 |
block_css = """
|
212 |
#notice_markdown {
|