Skip to content

Generate a description for an image using GPT, then generate an image from the description

License

Notifications You must be signed in to change notification settings

jdinkla/ai-text2image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ai-text2image

Example-App that shows the integration of GPT3.5 turbo and DALL-E 3 using langchain.

You need an OpenAI-API-key in order to run this example.

  1. Describe a situation in natural language.
  2. Create a scence description using GPT3.5 turbo
  3. Create an image using the description using DALL-E 3.

screenshot

The application is written in Python using Flask. It uses langchain and the OpenAI API.

Installation

$ make init
$ source venv/ai/bin/activate

Running

You need an OpenAI-API-key in order to run this example.

$ export OPENAI_API_KEY=<CREATE-A-KEY-AND-INSERT-HERE>
$ make run

Open the webbrowser at http://127.0.0.1:5000.

Upgrade dependencies

$ pip install aiohttp --upgrade

(c) 2023 - 2024 Jörn Dinkla

About

Generate a description for an image using GPT, then generate an image from the description

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published