Readme for Image Generation with Replicate and Streamlit This repository contains a simple Python script for generating images using the Replicate API and displaying the results through a Streamlit web application.
Prerequisites Before running the code, make sure you have the following installed:
Python Streamlit Replicate account and API Token Setup Clone the repository:
bash Copy code git clone https://github.com/akashkathole7/Anuj_Mix-nMatch-creative-image-generation.git Install the required Python libraries:
bash Copy code pip install -r requirements.txt Set up Replicate API Token:
Obtain your Replicate API Token from Replicate. Open the main.py file and set your Replicate API Token in the Streamlit sidebar. Running the Application Execute the following command in the terminal:
bash Copy code streamlit run main.py This will start a local development server and open the Streamlit web application in your default web browser.
Usage Enter your Replicate API Token in the provided password input on the Streamlit sidebar. Fill in the prompts for generating images: Enter a positive prompt in the "Enter prompt" field. Optionally, enter a negative prompt in the "Enter Negative prompt" field. Click the "Submit" button to generate images based on the provided prompts. The generated images will be displayed on the web page in a 2x2 grid.
Notes If the Replicate API Token is not provided, a warning message will be displayed in the Streamlit sidebar, and the application will not proceed until a valid token is entered. For more information on Replicate, refer to Replicate Documentation. Feel free to customize the code according to your requirements and explore additional features provided by the Replicate API and Streamlit