(This uses OpenAI's text-davinci-003 model, as it's currently the best at dealing with abstract requests like this)ģ: This prompt is then given to Open AI's Image generation AI, to create a full unique AI image. (We use the random-words package for this, which uses math.random as it's good enough for our use case)Ģ: We create a prompt using the words we obtained, the prompt is designed so that it uses the words as the object of a scene, and ask the Open AI text api to turn it into a caption for a piece of art. The program works in 5 main steps:ġ: Generates between 2 to 5 random words from the dictionary This program is a fully automated AI bot. Run npm run start - "more words" to pass in multiple words in one go. Run npm run start - helicopter to pass the word helicopter in as your intended word If you wish to specify your own words to give to the prompt rather than have the words be randomly generated you can pass them into the script like so: Run npm run start to begin the program using randomly generated words Run npm install from the root working directory to install the project using node env file in your root working directory and ensure it has the necessary variables, tokens, username, password etcĮnsure you have node.js v19.4.0 installedĬlone this Git repo to your local environment Subject to MIT Licence, see LICENCE.md file for more details. Posts can be found on Instagram at: An Instagram bot to generate and post AI images Usage
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |