Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -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=
|
268 |
|
269 |
# Generate reports (page and sentence levels)
|
270 |
def generate_page_report(df_pages, report_file_name):
|
@@ -546,7 +546,7 @@ def launch_interface():
|
|
546 |
gr.Markdown(
|
547 |
"When the analysis is done, the Primary SDGs bar graph on the left will show "+
|
548 |
"the percentage of pages that strongly align with each SDG. The icon for the most frequent "+
|
549 |
-
"SDG will be highlighted
|
550 |
label = "Note", container=True
|
551 |
)
|
552 |
|
@@ -594,7 +594,7 @@ def launch_interface():
|
|
594 |
gr.Markdown(
|
595 |
"When the analysis is done, the Primary SDGs bar graph on the left will show "+
|
596 |
"the percentage of sentences that strongly align with each SDG. The icon for the most frequent "+
|
597 |
-
"SDG will be highlighted
|
598 |
label = "Note", container=True
|
599 |
)
|
600 |
|
|
|
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=650, scale=6, engine="kaleido")
|
268 |
|
269 |
# Generate reports (page and sentence levels)
|
270 |
def generate_page_report(df_pages, report_file_name):
|
|
|
546 |
gr.Markdown(
|
547 |
"When the analysis is done, the Primary SDGs bar graph on the left will show "+
|
548 |
"the percentage of pages that strongly align with each SDG. The icon for the most frequent "+
|
549 |
+
"SDG will be highlighted on the graph. Download the Page Predictions CVS for further details.",
|
550 |
label = "Note", container=True
|
551 |
)
|
552 |
|
|
|
594 |
gr.Markdown(
|
595 |
"When the analysis is done, the Primary SDGs bar graph on the left will show "+
|
596 |
"the percentage of sentences that strongly align with each SDG. The icon for the most frequent "+
|
597 |
+
"SDG will be highlighted on the graph. Download the Sentence Predictions CVS for further details.",
|
598 |
label = "Note", container=True
|
599 |
)
|
600 |
|