This app is a Slack bot that generates images in the style of Mid Journey using the Replicate API. It is triggered by the /create-image
slash command and responds with a generated image in the same thread.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- A Slack app and bot set up and configured
- An API key for Replicate
- Python 3.6 or higher
- Pipenv (optional but recommended)
-
Clone the repository:
git clone https://github.com/your-username/slack-midjourney-bot.git
-
Change into the project directory:
cd slack-midjourney-bot
-
Set the following environment variables:
export SLACK_BOT_TOKEN=your_bot_token_here export SLACK_APP_TOKEN=your_app_token_here export REPLICATE_API_KEY=your_api_key_here
-
If you're using Pipenv, create a virtual environment and install the dependencies:
pipenv install
-
If you're not using Pipenv, install the dependencies with pip:
pip install -r requirements.txt
To start the app, run the following command:
python app.py
- Slack Bolt - The Slack API SDK used for creating and managing the Slack app
- Replicate - The image generation API used for creating the images