TejAndrewsACC commited on
Commit
31e45e6
Β·
verified Β·
1 Parent(s): 54037b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
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
- # Increase the size for better visibility of all models
152
  fig.update_layout(
153
- height=800, # Increase the height to make the chart larger
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=200, 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
  )
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")