sadickam commited on
Commit
9e7371c
·
verified ·
1 Parent(s): 6adba9a

Update app.py

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