Batch prompt from file for chatgpt 3.5-turbo to write poems inspired on a poet writing style and Dall-e to draw these inspired by the style of several artists. Requests to Azure OpenAI API.
Batch image results available on augmented reality for iPhone at the Tapgaze app.
generate_all_fast.mp4
Repo File Structure:
.
├── creds.json #enter your Azure OpenAI API credentials, sample below
├── descriptions.txt #poem description
├── images #poem and dalle output
├── LICENSE
├── README.md
├── request_manager.py #manager calling scripts to send requests to chatgpt3.5 and dalle models
├── send_dalle_request.py #Azure OpenAI send request method to dalle
├── send_gpt35_request.py #Azure OpenAI send request method to gpt3.5_turbo
└── user_inputs.py #request inputs
Complete creds.json with your Azure OpenAI credentials:
{
"chatgpt35_openai_api": {
"OPENAI_API_KEY": "",
"OPENAI_API_VERSION": "",
"OPENAI_API_BASE": "",
"OPENAI_API_TYPE": "",
"OPENAI_API_DEPLOYMENT_NAME": ""
},
"dalle_openai_api": {
"OPENAI_API_KEY": "",
"OPENAI_API_VERSION": "",
"OPENAI_API_BASE": "",
"OPENAI_API_TYPE": "",
"OPENAI_API_DEPLOYMENT_NAME": "DOES_NOT_APPLY_NA"
}
}
---------------------------------------------
See code decorator branch for ChatGPT assisted poem description. You can read more about this generation flow at our Blog at Tapgaze: Part II: Chained Specialized AI Models Deliver Better Results
Inputs at: user_inputs.py and creds.json
If you find this helpful you can buy me a coffee :)