sadickam commited on
Commit
96a68ff
·
verified ·
1 Parent(s): 2280d1c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -218,7 +218,7 @@ def plot_sdg(df, title, pred_column, icons_folder='assets/icons/'):
218
  ),
219
  margin=dict(l=20, r=30, t=100, b=20), # Increased right margin for icon
220
  height=600,
221
- width=700, # Increased width to accommodate the icon
222
  showlegend=False,
223
  template="simple_white",
224
  xaxis=dict(
@@ -247,7 +247,7 @@ def plot_sdg(df, title, pred_column, icons_folder='assets/icons/'):
247
  dict(
248
  source='data:image/png;base64,' + encoded_image,
249
  xref="paper", yref="paper",
250
- x=0.4, y=1.05, # Positioning: slightly to the right and top
251
  sizex=0.2, sizey=0.2, # Size of the icon
252
  xanchor="left",
253
  yanchor="top",
@@ -261,7 +261,7 @@ def plot_sdg(df, title, pred_column, icons_folder='assets/icons/'):
261
 
262
  def save_figure_as_jpeg(fig, filename):
263
  """Saves the Plotly figure as a high-resolution JPEG."""
264
- pio.write_image(fig, filename, format='jpeg', width=1000, height=600, scale=5)
265
 
266
  # Generate reports (page and sentence levels)
267
  def generate_page_report(df_pages, report_file_name):
 
218
  ),
219
  margin=dict(l=20, r=30, t=100, b=20), # Increased right margin for icon
220
  height=600,
221
+ width=800,
222
  showlegend=False,
223
  template="simple_white",
224
  xaxis=dict(
 
247
  dict(
248
  source='data:image/png;base64,' + encoded_image,
249
  xref="paper", yref="paper",
250
+ x=0.4, y=1.2, # Positioning: slightly to the right and top
251
  sizex=0.2, sizey=0.2, # Size of the icon
252
  xanchor="left",
253
  yanchor="top",
 
261
 
262
  def save_figure_as_jpeg(fig, filename):
263
  """Saves the Plotly figure as a high-resolution JPEG."""
264
+ pio.write_image(fig, filename, format='jpeg', width=1000, height=700, scale=5)
265
 
266
  # Generate reports (page and sentence levels)
267
  def generate_page_report(df_pages, report_file_name):