Spaces:
Build error
Build error
Add sidebar with PPT template selection
Browse files21 unmodified lines222324252627110 unmodified lines13813914014114214314414514614714814915015115215321 unmodified lineslogger = logging.getLogger(__name__)progress_bar = st.progress(0, text='Setting up SlideDeck AI...')def display_page_header_content():"""110 unmodified lines# Now create the PPT fileprogress_bar_pptx.progress(75, 'Creating the slide deck...give it a moment')generate_slide_deck(response_cleaned, pptx_template='Blank')progress_bar_pptx.progress(100, text='Done!')def generate_slide_deck(json_str: str, pptx_template: str) -> List:"""Create a slide deck.:param json_str: The content in *valid* JSON format.:param pptx_template: The PPTX template name.:return: A list of all slide headers and the title."""21 unmodified lines222324252627282930313233343536110 unmodified lines14714814915015115215315415515615715815916016121 unmodified lineslogger = logging.getLogger(__name__)progress_bar = st.progress(0, text='Setting up SlideDeck AI...')texts = list(GlobalConfig.PPTX_TEMPLATE_FILES.keys())captions = [GlobalConfig.PPTX_TEMPLATE_FILES[x]['caption'] for x in texts]pptx_template = st.sidebar.radio('Select a presentation template:',texts,captions=captions,horizontal=True)def display_page_header_content():"""110 unmodified lines# Now create the PPT fileprogress_bar_pptx.progress(75, 'Creating the slide deck...give it a moment')generate_slide_deck(response_cleaned)progress_bar_pptx.progress(100, text='Done!')def generate_slide_deck(json_str: str) -> List:"""Create a slide deck.:param json_str: The content in *valid* JSON format.:return: A list of all slide headers and the title."""
chat_app.py+11-3