Python3 Script for Raspberry Pi to create images via OpenAI.
Tested on RPI4 with OS Bullseye 64-bit.
Installationsudo apt update
sudo apt upgrade
sudo apt-get install python3
sudo apt-get install python3-pip
pip3 install openai
pip3 install requests
Don't forget to enter your API key that you got from OpenAi in the scrip :
openai.api_key=" "
Run :
python3 gen.py
options :
- open : vieuw image in browser.
- exit : close script
- print : vieuw image URL.
- get : download generated image and saves it like "picopenai.png" file.
- new : generate new image.
There can be some time between each action.
Depends on response OpenAi.






Comments