JairoCesar commited on
Commit
cdf7ff0
·
verified ·
1 Parent(s): 5b67441

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -73,13 +73,13 @@ def apply_design(prs, design):
73
  for shape in slide.shapes:
74
  if shape.has_text_frame:
75
  tf = shape.text_frame
76
- tf.text = tf.text
77
  for paragraph in tf.paragraphs:
78
  paragraph.font.color.rgb = RGBColor(0, 0, 0)
79
- if shape.name == 'Title':
80
  paragraph.font.size = Pt(44)
81
  else:
82
  paragraph.font.size = Pt(24)
 
83
  elif design == "Corporativo":
84
  background = slide.background
85
  fill = background.fill
@@ -96,10 +96,9 @@ def apply_design(prs, design):
96
  for shape in slide.shapes:
97
  if shape.has_text_frame:
98
  tf = shape.text_frame
99
- tf.text = tf.text
100
  for paragraph in tf.paragraphs:
101
  paragraph.font.color.rgb = RGBColor(0, 0, 0)
102
- if shape.name == 'Title':
103
  paragraph.font.size = Pt(40)
104
  paragraph.font.color.rgb = RGBColor(0, 112, 192)
105
  else:
@@ -117,7 +116,6 @@ def create_powerpoint(slides, design):
117
  title_shape.text = slide_data['title']
118
  content_shape.text = slide_data['content']
119
 
120
- # Aplicar el diseño seleccionado
121
  apply_design(prs, design)
122
 
123
  pptx_buffer = io.BytesIO()
 
73
  for shape in slide.shapes:
74
  if shape.has_text_frame:
75
  tf = shape.text_frame
 
76
  for paragraph in tf.paragraphs:
77
  paragraph.font.color.rgb = RGBColor(0, 0, 0)
78
+ if shape == slide.shapes.title:
79
  paragraph.font.size = Pt(44)
80
  else:
81
  paragraph.font.size = Pt(24)
82
+
83
  elif design == "Corporativo":
84
  background = slide.background
85
  fill = background.fill
 
96
  for shape in slide.shapes:
97
  if shape.has_text_frame:
98
  tf = shape.text_frame
 
99
  for paragraph in tf.paragraphs:
100
  paragraph.font.color.rgb = RGBColor(0, 0, 0)
101
+ if shape == slide.shapes.title:
102
  paragraph.font.size = Pt(40)
103
  paragraph.font.color.rgb = RGBColor(0, 112, 192)
104
  else:
 
116
  title_shape.text = slide_data['title']
117
  content_shape.text = slide_data['content']
118
 
 
119
  apply_design(prs, design)
120
 
121
  pptx_buffer = io.BytesIO()