This tool allows you to automatically post to Instagram by generating captions and images using machine learning models. Originally, the idea was to randomly pick words from the dictionary, have ChatGPT turn these words into a usable prompt for Dall-E, and have this AI generate the image. However, the generated art did not suit me, as it was too random and abstract. Now, the prompt is directly generated by ChatGPT with certain constraints.
The tool uses the Instagram API to post on instagram. Every time a post is scheduled, the tool generates a prompt using ChatGPT, a large language model. This prompt is passed to DALL-E, an AI model developed by OpenAI that generates an image from textual prompts. Finally, the tool posts the generated image and caption to your Instagram account.
To use this tool, you will need to have Python 3.x installed on your machine. You can download Python from the official website.
To install the required libraries, run the following command:
pip install openai
You will also need to create a developer account with Instagram and obtain your client_id
, client_secret
, and access_token
, as well as an API key to use OpenAI tools. For more information, see the Instagram API documentation.
All these API keys and tokens will need to be stored in creds.py file.
To use the tool, run the following command:
python main.py
This will start the tool and begin posting to your Instagram account.
If you find any issues with the tool or have ideas for improvements, feel free to open an issue or submit a pull request on GitHub.
This tool is licensed under the MIT License.