Potion is a generative AI tool designed to create PowerPoint presentations (PPTX files) based on user input. It helps you:
- Boost Creativity: Generate presentation skeletons to kickstart your ideas.
- Accelerate Development: Save time by automating slide creation.
- Enhance Productivity: Quickly produce presentations that are easily customizable.
- Flexibility: Easily replicable and adaptable to different platforms.
- Generate PowerPoint presentations from text descriptions.
- Use AI to design slides and compose content.
- Start a FastAPI server for API access.
- Analyze and dissect PPTX files for development purposes.
- Clone the Repository
git clone https://github.com/WildSphee/potion
cd potion
- Install Poetry
pip install poetry
- Install Dependencies
poetry install
- Start the API Server
To run the API server, execute:
sh scripts/start.shBy default the port opened is 8888
- Visit FastAPI Docs
visit localhost:8888/docs for FastAPI swagger docs.
- Generate PPT
Input your powerpoint outline into the create-ppt/ endpoint, and let Potion handle the rest!
Doesn't have to follow this format, here's just an example:
Slide 0: Title Slide -
This slide will display the presentation title: "Exploring Global Cuisines and Restaurant Sales Trends."
Slide 1: Global Overview of Cuisines -
This slide will describe the most popular cuisines globally, highlighting the appeal of cuisines like Italian, Chinese, Indian, and Japanese.
Slide 2: Regional Preferences -
This slide will present data on regional preferences, such as the popularity of American fast food in North America and Asian cuisines in Southeast Asia.
Slide 3: Sales Trends in Restaurants by Region -
This slide will show restaurant sales data for major markets, comparing regions like North America, Europe, and Asia in terms of growth and market size.
...
Create a .env file in the root directory with the following format:
OPENAI_API_KEY=<starts_with_sk>
# Replicate Image Generation
REPLICATE_API_TOKEN=<for_image_generation>
# PPT Output folder
PPT_OUTPUT_FOLDER=output/
# Image Output folder
IMAGE_OUTPUT_FOLDER=output/Replace the placeholders with your actual API keys and desired output folders.
You can generate a PowerPoint presentation first by selecting a predefined potion object, in this example ncsgpt_potion is used:
from ncsgpt_potion import ncspotion
from potion import DesignSchema
user_input = ```Your presentation content here.```
design = await ncspotion.design(user_input, 1)
await ncspotion.compose(design)
path = ncspotion.save(design[0].desc)
print(path)- Linting
For code linting, run:
sh scripts/lint.sh- Dissecting PPTX Files
To analyze the shapes and format of a PPTX object, use:
python scripts/dissect_pptx.py --<file_path>Contributions are welcome! Please follow these guidelines:
- Fork the Repository: Create a personal fork of the project.
- Create a Feature Branch: Work on your feature or bugfix in a new branch.
- Write Clear Commit Messages: Keep your commit messages concise and descriptive.
- Code Style and Linting: Ensure your code adheres to the project's coding standards.
We use linting to maintain code quality and consistency. Before submitting a pull request, run the linter:
sh scripts/lint.shThis script checks the code for stylistic errors and enforces coding standards.
- Submit PRs to the
masterBranch: Make sure your pull request targets themasterbranch. - Describe Your Changes: Provide a clear description of your changes and the problem they solve.
- Review Process: Your pull request will be reviewed by maintainers. Please address any feedback promptly.
For any questions or suggestions, feel free to open an issue or contact the maintainers.