Roni Goldshmidt
commited on
Commit
·
a5b8c6f
1
Parent(s):
88c46c5
Initial leaderboard setup
Browse files- .ipynb_checkpoints/app-checkpoint.py +26 -10
- app.py +26 -10
.ipynb_checkpoints/app-checkpoint.py
CHANGED
@@ -198,6 +198,31 @@ with tab2:
|
|
198 |
)
|
199 |
st.plotly_chart(fig, use_container_width=True)
|
200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
# Individual Precision-Recall plots for each class
|
202 |
unique_classes = class_data['Class'].unique()
|
203 |
num_classes = len(unique_classes)
|
@@ -228,16 +253,7 @@ with tab2:
|
|
228 |
xaxis_range=[0, 1],
|
229 |
yaxis_range=[0, 1],
|
230 |
margin=dict(l=40, r=40, t=40, b=40),
|
231 |
-
|
232 |
-
orientation="h", # Horizontal legend
|
233 |
-
yanchor="bottom",
|
234 |
-
y=-0.4, # Position below the plot
|
235 |
-
xanchor="center",
|
236 |
-
x=0.5, # Center horizontally
|
237 |
-
font=dict(size=8),
|
238 |
-
itemwidth=30, # Make legend items more compact
|
239 |
-
traceorder="normal"
|
240 |
-
)
|
241 |
)
|
242 |
|
243 |
# Add diagonal reference line
|
|
|
198 |
)
|
199 |
st.plotly_chart(fig, use_container_width=True)
|
200 |
|
201 |
+
# Create a single legend figure
|
202 |
+
legend_fig = go.Figure()
|
203 |
+
for model in selected_models:
|
204 |
+
legend_fig.add_trace(go.Scatter(
|
205 |
+
x=[None],
|
206 |
+
y=[None],
|
207 |
+
mode='markers',
|
208 |
+
name=model,
|
209 |
+
showlegend=True
|
210 |
+
))
|
211 |
+
legend_fig.update_layout(
|
212 |
+
showlegend=True,
|
213 |
+
legend=dict(
|
214 |
+
orientation="h",
|
215 |
+
yanchor="middle",
|
216 |
+
y=1,
|
217 |
+
xanchor="center",
|
218 |
+
x=0.5,
|
219 |
+
font=dict(size=12)
|
220 |
+
),
|
221 |
+
margin=dict(l=0, r=0, t=0, b=0),
|
222 |
+
height=50
|
223 |
+
)
|
224 |
+
st.plotly_chart(legend_fig, use_container_width=True)
|
225 |
+
|
226 |
# Individual Precision-Recall plots for each class
|
227 |
unique_classes = class_data['Class'].unique()
|
228 |
num_classes = len(unique_classes)
|
|
|
253 |
xaxis_range=[0, 1],
|
254 |
yaxis_range=[0, 1],
|
255 |
margin=dict(l=40, r=40, t=40, b=40),
|
256 |
+
showlegend=False, # Hide individual legends
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
)
|
258 |
|
259 |
# Add diagonal reference line
|
app.py
CHANGED
@@ -198,6 +198,31 @@ with tab2:
|
|
198 |
)
|
199 |
st.plotly_chart(fig, use_container_width=True)
|
200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
# Individual Precision-Recall plots for each class
|
202 |
unique_classes = class_data['Class'].unique()
|
203 |
num_classes = len(unique_classes)
|
@@ -228,16 +253,7 @@ with tab2:
|
|
228 |
xaxis_range=[0, 1],
|
229 |
yaxis_range=[0, 1],
|
230 |
margin=dict(l=40, r=40, t=40, b=40),
|
231 |
-
|
232 |
-
orientation="h", # Horizontal legend
|
233 |
-
yanchor="bottom",
|
234 |
-
y=-0.4, # Position below the plot
|
235 |
-
xanchor="center",
|
236 |
-
x=0.5, # Center horizontally
|
237 |
-
font=dict(size=8),
|
238 |
-
itemwidth=30, # Make legend items more compact
|
239 |
-
traceorder="normal"
|
240 |
-
)
|
241 |
)
|
242 |
|
243 |
# Add diagonal reference line
|
|
|
198 |
)
|
199 |
st.plotly_chart(fig, use_container_width=True)
|
200 |
|
201 |
+
# Create a single legend figure
|
202 |
+
legend_fig = go.Figure()
|
203 |
+
for model in selected_models:
|
204 |
+
legend_fig.add_trace(go.Scatter(
|
205 |
+
x=[None],
|
206 |
+
y=[None],
|
207 |
+
mode='markers',
|
208 |
+
name=model,
|
209 |
+
showlegend=True
|
210 |
+
))
|
211 |
+
legend_fig.update_layout(
|
212 |
+
showlegend=True,
|
213 |
+
legend=dict(
|
214 |
+
orientation="h",
|
215 |
+
yanchor="middle",
|
216 |
+
y=1,
|
217 |
+
xanchor="center",
|
218 |
+
x=0.5,
|
219 |
+
font=dict(size=12)
|
220 |
+
),
|
221 |
+
margin=dict(l=0, r=0, t=0, b=0),
|
222 |
+
height=50
|
223 |
+
)
|
224 |
+
st.plotly_chart(legend_fig, use_container_width=True)
|
225 |
+
|
226 |
# Individual Precision-Recall plots for each class
|
227 |
unique_classes = class_data['Class'].unique()
|
228 |
num_classes = len(unique_classes)
|
|
|
253 |
xaxis_range=[0, 1],
|
254 |
yaxis_range=[0, 1],
|
255 |
margin=dict(l=40, r=40, t=40, b=40),
|
256 |
+
showlegend=False, # Hide individual legends
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
)
|
258 |
|
259 |
# Add diagonal reference line
|