Spaces:
Build error
Build error
update logic
Browse filesFiles changed (2)
- app.py+3-4
- presentation.py+4-10
74 unmodified lines7576777879808182833 unmodified lines8788899091929374 unmodified lines"Each slide should be seperate","Each slide should have 4 parts :""1. Title : title of the slide ","2. Text: he detailed description or narrative content of the slide. This should include key information, explanations, or supporting arguments. Keep it concise yet informative to avoid overwhelming the audience.","3. Bullet point: A list of bullet points summarizing key information on the slide. Each bullet point should be detail, long, and highlight a specific aspect of the slide's topic. ideally, limit to 3-5 points.","4. Image Suggestion: A prompt for generating an image to complement the slide content. Describe the desired visual in detail, including elements, style, and relevance to the topic. Ensure the prompt is actionable for AI tools.",))listOfString = split_into_token_chunks("".join(data))print(len(listOfString))3 unmodified linesfor x in listOfString:result = agent.run_sync(user_prompt = f"Create me a powerpoint presentation {x}",message_history = message_history)message_history = []message_history = result.all_messages()result_data.append(result.data)print(result_data[-1])74 unmodified lines7576777879808182833 unmodified lines87888990919274 unmodified lines"Each slide should be seperate","Each slide should have 4 parts :""1. Title : title of the slide ","2. Text: he presise and short description or narrative content of the slide. This should include key information, explanations, or supporting arguments. Keep it concise yet informative to avoid overwhelming the audience.","3. Bullet point: A list of bullet points summarizing key information on the slide. Each bullet point should be short, presise, and highlight a specific aspect of the slide's topic. ideally, limit to 3-5 points.",#"4. Image Suggestion: A prompt for generating an image to complement the slide content. Describe the desired visual in detail, including elements, style, and relevance to the topic. Ensure the prompt is actionable for AI tools.",))listOfString = split_into_token_chunks("".join(data))print(len(listOfString))3 unmodified linesfor x in listOfString:result = agent.run_sync(user_prompt = f"Create me a powerpoint presentation {x}",message_history = message_history)message_history = result.all_messages()result_data.append(result.data)print(result_data[-1])
8 unmodified lines91011121314151617181920212223242526272829308 unmodified linestitle: str = Field(description="The main title of the slide. Should be concise and descriptive, summarizing the core idea of the slide. Avoid lengthy titles and focus on clarity.")# subTitle: Optional[str] = Field(# description="An optional subtitle for the slide, typically used on the first slide to provide context or additional information. It should complement the title and give more detail about the presentation topic."# )# author: Optional[str] = Field(# description="The name of the author or presenter, typically included on the first slide. Useful for attributing the presentation to a specific individual or organization."# )text: str = Field(description="The detailed description or narrative content of the slide. This should include key information, explanations, or supporting arguments. Keep it concise yet informative to avoid overwhelming the audience.")bulletPoints: Optional[List[str]] = Field(description="A list of bullet points summarizing key information on the slide. Each bullet point should be detail, long, and highlight a specific aspect of the slide's topic. ideally, limit to 3-5 points.")imageSuggestion: Optional[str] = Field(description="A prompt for generating an image to complement the slide content. Describe the desired visual in detail, including elements, style, and relevance to the topic. Ensure the prompt is actionable for AI tools.")@dataclassclass PPT(BaseModel):per:list[Presentation] = Field(description="A list of `Presentation` objects, where each object represents a single slide in the PowerPoint presentation. Ensure that the list is ordered logically to maintain the flow of the presentation. Each `Presentation` object should provide the necessary details, including title, content, bullet points, and optional image suggestions, to create an engaging and informative slide deck.")8 unmodified lines91011121314151617181920212223248 unmodified linestitle: str = Field(description="The main title of the slide. Should be concise and descriptive, summarizing the core idea of the slide. Avoid lengthy titles and focus on clarity.")text: str = Field(description="The detailed description or narrative content of the slide. This should include key information, explanations, or supporting arguments. Keep it concise yet informative to avoid overwhelming the audience.")bulletPoints: Optional[List[str]] = Field(description="A list of bullet points summarizing key information on the slide. Each bullet point should be detail, long, and highlight a specific aspect of the slide's topic. ideally, limit to 3-5 points.")# imageSuggestion: Optional[str] = Field(# description="A prompt for generating an image to complement the slide content. Describe the desired visual in detail, including elements, style, and relevance to the topic. Ensure the prompt is actionable for AI tools."# )@dataclassclass PPT(BaseModel):per:list[Presentation] = Field(description="A list of `Presentation` objects, where each object represents a single slide in the PowerPoint presentation. Ensure that the list is ordered logically to maintain the flow of the presentation. Each `Presentation` object should provide the necessary details, including title, content, bullet points, to create an engaging and informative slide deck.")
app.py+3-4
presentation.py+4-10