Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -139,6 +139,7 @@ def generate_score_chart_laser(dataframe):
|
|
139 |
|
140 |
# π **Combined Score Visualization for All Models**
|
141 |
# π **Combined Score Visualization for All Models (Large Chart)**
|
|
|
142 |
def generate_score_chart_all_models(dataframe):
|
143 |
fig = px.bar(
|
144 |
dataframe.sort_values(by="Score", ascending=True),
|
@@ -148,15 +149,16 @@ def generate_score_chart_all_models(dataframe):
|
|
148 |
color_continuous_scale="electric"
|
149 |
)
|
150 |
|
151 |
-
#
|
152 |
fig.update_layout(
|
153 |
-
|
154 |
-
width=1200, # Increase the width to fit all the data
|
155 |
title_x=0.5, # Center the title
|
156 |
title_y=0.95, # Adjust title position
|
157 |
-
margin=dict(l=
|
158 |
xaxis_title="Score", # X-axis title
|
159 |
yaxis_title="Model", # Y-axis title
|
|
|
|
|
160 |
)
|
161 |
|
162 |
fig.update_traces(textposition="outside")
|
|
|
139 |
|
140 |
# π **Combined Score Visualization for All Models**
|
141 |
# π **Combined Score Visualization for All Models (Large Chart)**
|
142 |
+
# π **Combined Score Visualization for All Models (Responsive)**
|
143 |
def generate_score_chart_all_models(dataframe):
|
144 |
fig = px.bar(
|
145 |
dataframe.sort_values(by="Score", ascending=True),
|
|
|
149 |
color_continuous_scale="electric"
|
150 |
)
|
151 |
|
152 |
+
# Update the layout to be fully responsive
|
153 |
fig.update_layout(
|
154 |
+
autosize=True, # Make the chart auto-size
|
|
|
155 |
title_x=0.5, # Center the title
|
156 |
title_y=0.95, # Adjust title position
|
157 |
+
margin=dict(l=150, r=50, t=50, b=50), # Adjust margins for better readability
|
158 |
xaxis_title="Score", # X-axis title
|
159 |
yaxis_title="Model", # Y-axis title
|
160 |
+
showlegend=False, # Hide legend
|
161 |
+
template="plotly_light", # Optional dark theme for the chart
|
162 |
)
|
163 |
|
164 |
fig.update_traces(textposition="outside")
|