An open API service indexing awesome lists of open source software.

https://github.com/rishabkumar7/dalle-python-sms

Generate art with DALLE via SMS using Twilio
https://github.com/rishabkumar7/dalle-python-sms

dall-e flask openai python sms twilio

Last synced: 12 months ago
JSON representation

Generate art with DALLE via SMS using Twilio

Awesome Lists containing this project

README

          

# Generate images using DALLE via SMS

![text-an-astronaut-coding](https://user-images.githubusercontent.com/45825464/216394752-3950dbcc-944a-4e08-b7d6-35442f917fdf.jpg)

## Requirements:
- You'll need an OpenAI API Key. You can [get one here](https://platform.openai.com/account/api-keys).
- ngrok
- Pip packages - openai, flask, twilio, python-dotenv

## Set an Environment Variable
Create a `.env` file in your root directory and add the following line:
`OPENAI_API_KEY=YOUR-OPENAI-API-KEY`

## Configure the Flask App
Run the flask app
`python app.py`

Use `ngrok` to make your flask app accessible over the internet.
`ngrok http 5000`
The above command will give you this output:
ngrok-terminal

Use the forwarding URL as Webhook in the Twilio console in your number settings:
Twilio-SMS-Console