The current version of this project resides at github.com/modelearth/requests
Our Storyboard Team, led by Kishor and Anthony, has created a Streamlit application that transforms text prompts into storyboard gallery images and videos using the Replicate, Leonardo and other generative AI APIs. Users can enter a prompt or load prompts from a CSV file. Images are generated in different aspect ratios and can be saved directly to a GitHub repository for easy access and embedding using either our JQuery Images Display or React Gallery.
- Prompt Selection: Users can choose from a variety of predefined prompts listed in a CSV file.
- Image Generation: The app generates images based on the selected prompt using the Replicate model.
- Multiple Aspect Ratios: Supports the creation of images in square and horizontal formats.
- GitHub Integration: Automatically saves generated images to a specified GitHub repository.
- Streamlit
- Pandas
- Replicate Python Client
- Python Requests
- Pillow (PIL)
1.) Clone the repository to your local computer.
2.) Navigate to the directory, start a virtual env, and install the required packages:
python3 -m venv env && source env/bin/activate &&
pip install -r requirements.txt3.) Save a copy of example_secrets.toml as secrets.toml
4.) If you will be sending files to your GitHub account, in .streamlit/secrets.toml add:
GITHUB_TOKEN GITHUB_REPOSITORY
To create a GITHUB_TOKEN, in GitHub.com go to: Settings -> Developer Settings -> Personal access tokens.
Checking the first three checkboxes should suffice: repo, workflow and write:packages
The GITHUB_REPOSITORY would be one your own repo, in this format:
https://github.com/[your account]/[your repo]
5.) Set your Replicate API Token in .streamlit/secrets.toml.
You can get a free Replicate API Token, but they are slow. Purchased tokens are affordable.
6.) Update the CSV file with your prompts.
7.) Run the Streamlit app:
streamlit run streamlit_app.pyOr run the .csv prompt input version:
streamlit run code_gen_images_sq_wide_ME.py8.) Open the Streamlit app in your web browser.
9.) Use the sidebar to select a prompt from the CSV file.
10.) Click on 'Generate Image' to start the image generation process.
11.) View the generated images in different aspect ratios.
12.) Check your GitHub repository for the saved images.
Contributions to improve this project are welcome. Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or fix.
- Commit your changes.
- Push to the branch.
- Open a pull request.