Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -92,7 +92,7 @@ if uploaded_file is not None:
|
|
| 92 |
|
| 93 |
for paragraph in paragraphs:
|
| 94 |
summary = summarizer(paragraph, max_length=(len(paragraph) / 2), min_length=10, do_sample=False)
|
| 95 |
-
summary_text = add_line_breaks_to_summary(summary[0]['summary_text'],
|
| 96 |
|
| 97 |
# Generate and save the image to a temporary file
|
| 98 |
image_bytes = query({
|
|
@@ -108,7 +108,7 @@ if uploaded_file is not None:
|
|
| 108 |
# Add the image to the slide at the bottom (resized to 500x500 pixels)
|
| 109 |
left = Inches(1)
|
| 110 |
top = Inches(2)
|
| 111 |
-
width = height = Inches(
|
| 112 |
pic = slide.shapes.add_picture(temp_img_path, left, top, width, height)
|
| 113 |
|
| 114 |
# Add the paragraph to the slide at the top
|
|
|
|
| 92 |
|
| 93 |
for paragraph in paragraphs:
|
| 94 |
summary = summarizer(paragraph, max_length=(len(paragraph) / 2), min_length=10, do_sample=False)
|
| 95 |
+
summary_text = add_line_breaks_to_summary(summary[0]['summary_text'], 80)
|
| 96 |
|
| 97 |
# Generate and save the image to a temporary file
|
| 98 |
image_bytes = query({
|
|
|
|
| 108 |
# Add the image to the slide at the bottom (resized to 500x500 pixels)
|
| 109 |
left = Inches(1)
|
| 110 |
top = Inches(2)
|
| 111 |
+
width = height = Inches(3)
|
| 112 |
pic = slide.shapes.add_picture(temp_img_path, left, top, width, height)
|
| 113 |
|
| 114 |
# Add the paragraph to the slide at the top
|