JairoCesar commited on
Commit
85f90c9
·
verified ·
1 Parent(s): 727c0e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import streamlit as st
2
  from pptx import Presentation
3
- from pptx.util import Inches
4
  import io
5
  from huggingface_hub import InferenceClient
6
  import json
@@ -70,12 +70,6 @@ def generate_presentation_content(topic, client, max_retries=3):
70
  def create_powerpoint(slides, template_path):
71
  prs = Presentation(template_path)
72
 
73
- # Eliminar la primera diapositiva en blanco si existe
74
- if len(prs.slides) > 0:
75
- xml_slides = prs.slides._sldIdLst
76
- slides_elements = list(xml_slides)
77
- xml_slides.remove(slides_elements[0])
78
-
79
  for slide_data in slides:
80
  slide = prs.slides.add_slide(prs.slide_layouts[1])
81
 
@@ -148,4 +142,4 @@ def main():
148
  st.warning("Por favor, ingrese un tema para la presentación.")
149
 
150
  if __name__ == "__main__":
151
- main()
 
1
  import streamlit as st
2
  from pptx import Presentation
3
+ from pptx.util import Inches, Pt
4
  import io
5
  from huggingface_hub import InferenceClient
6
  import json
 
70
  def create_powerpoint(slides, template_path):
71
  prs = Presentation(template_path)
72
 
 
 
 
 
 
 
73
  for slide_data in slides:
74
  slide = prs.slides.add_slide(prs.slide_layouts[1])
75
 
 
142
  st.warning("Por favor, ingrese un tema para la presentación.")
143
 
144
  if __name__ == "__main__":
145
+ main()