Spaces:
Build error
Build error
Add sidebar with PPT template selection
Browse files21 unmodified lines222324252627282930313233343536110 unmodified lines14714814914115015115215314515415515615715815015916016121 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 file progress_bar_pptx.progress(75, 'Creating the slide deck...give it a moment') generate_slide_deck(response_cleaned, pptx_template='Blank') generate_slide_deck(response_cleaned) progress_bar_pptx.progress(100, text='Done!')
def generate_slide_deck(json_str: str, pptx_template: str) -> List:def generate_slide_deck(json_str: 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. """
chat_app.py+11-3