This Python bot automates Instagram posts 100% (Generates an image [Dall-E3], Analyzes for: Title, Description & Hashtags [GPT-Vision] & Upload [Instagrapi]).
-
bot.py
: This is the main script that orchestrates the usage of other modules. It integrates functionalities fromdall.py
,downloadImage.py
,gptVision.py
, and external APIs to perform a series of tasks. It requires environment variables to be set for API keys and other configurations. -
dall.py
: Utilizes the DALL-E API to generate images based on text descriptions. It encapsulates the functionality to interact with the DALL-E service, requiring API keys set as environment variables. -
downloadImage.py
: Provides the ability to download images from URLs. It is used to retrieve and save images generated by DALL-E or analyzed by GPT-3 vision models. -
gptVision.py
: Contains functions to encode images into a base64 format and to describe images using a vision model. This script interacts with an external API to get image descriptions. -
insta.py
: A script designed for interacting with Instagram through theinstagrapi
library. It handles authentication and provides functionality to perform actions on Instagram. It's not directly integrated with other scripts but can be used for social media automation.
To run these scripts, you will need Python 3.6 or later. Some scripts require external libraries which can be installed via pip:
pip install -r requirements.txt
You'll also need to set up environment variables for API keys and other configurations as required by each script.
Each script can be run separately. For example, to run python bot.py
:
Make sure to configure the necessary environment variables before running the scripts.
Variable Name | Description |
---|---|
OpenAI Settings | --- |
MY_OPENAI_API_KEY |
Your OpenAI api key (It's mandatory) https://platform.openai.com/api-keys |
Dall-E Settings | -- |
DALLE_PROMPT |
Here your Dall-E 3 prompt, By default it's : a white siamese cat |
DALLE_SIZE |
You can adjust the image size between theses sizes : 1024x1024, 1024x1792 & 1792x1024 |
DALLE_QUALITY |
You can choose the quality of your image, either : standard or hd |
DALLE_MODEL |
By default the bot use : dall-e-3, but you can use : dall-e-2 |
Instagram Settings | -- |
INSTA_ACCOUNT_USERNAME |
This is your instagram username : https://www.instagram.com/yourusername/ |
INSTA_ACCOUNT_PASSWORD |
This is your instagram password |
INSTA_ACCOUNT_2FA_CODE |
If you using a 2FA application |
Contributions to this repository are welcome. Please feel free to open issues or pull requests to suggest improvements or add new features.