Spaces:
Sleeping
Sleeping
update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import google.generativeai as genai
|
|
3 |
from pptx import Presentation
|
4 |
from pptx.util import Inches, Pt
|
5 |
from pptx.dml.color import RGBColor
|
6 |
-
from pptx.enum.text import PP_ALIGN
|
7 |
from pptx.oxml.xmlchemy import OxmlElement
|
8 |
import io
|
9 |
import re
|
@@ -185,7 +185,8 @@ def create_detailed_pptx(slides_data, theme):
|
|
185 |
title.text_frame.paragraphs[0].font.name = theme["title_font"]
|
186 |
|
187 |
title.text_frame.word_wrap = True
|
188 |
-
title.text_frame.auto_size =
|
|
|
189 |
title.top = Inches(0.5)
|
190 |
title.height = Inches(1.5)
|
191 |
title.width = Inches(11)
|
|
|
3 |
from pptx import Presentation
|
4 |
from pptx.util import Inches, Pt
|
5 |
from pptx.dml.color import RGBColor
|
6 |
+
from pptx.enum.text import PP_ALIGN, MSO_AUTO_SIZE # Fixed auto_size issue
|
7 |
from pptx.oxml.xmlchemy import OxmlElement
|
8 |
import io
|
9 |
import re
|
|
|
185 |
title.text_frame.paragraphs[0].font.name = theme["title_font"]
|
186 |
|
187 |
title.text_frame.word_wrap = True
|
188 |
+
title.text_frame.auto_size = MSO_AUTO_SIZE.SHAPE_TO_FIT_TEXT # ✅ Corrected Here
|
189 |
+
|
190 |
title.top = Inches(0.5)
|
191 |
title.height = Inches(1.5)
|
192 |
title.width = Inches(11)
|