A Streamlit app that turns a single topic into a PowerPoint presentation using Gemini for slide content and Unsplash for slide images.
- Loads API keys from
.env - Sends a prompt to Gemini for structured slide JSON
- Optionally fetches matching images from Unsplash for each slide
- Previews the generated slide outline and images in Streamlit
- Creates a
.pptxfile ingenerated_presentations/ - Lets you download the same
.pptxfile from the browser
- Create and activate a virtual environment.
- Install dependencies:
pip install -r requirements.txt - Add your API keys to
.env:GEMINI_API_KEY=your_key_hereUNSPLASH_ACCESS_KEY=your_unsplash_key_here
You can also use GOOGLE_API_KEY instead of GEMINI_API_KEY.
streamlit run app.pyAfter you click Generate presentation, the app will:
- save the PowerPoint file in
generated_presentations/ - show the saved file path in the UI
- provide a download button for the same file
- embed Unsplash images when that option is enabled
- The app defaults to the
gemini-2.5-flashmodel. - Export requires
python-pptxto be installed. - The API keys are never shown in the UI.
- The code includes inline comments around the main generation, image, and export steps.
