10000 GitHub - tobiade/serendipi-art: Deterministically-generated Voronoi images with random captions from OpenAI.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tobiade/serendipi-art

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serendipi-art? Really?

'Serendipi-art' originated from a lack of creative juice and is short for 'serendipitious art'. Serendipi-art determinstically generates a Voronoi image with a random caption by providing it with a seed value. The image is captioned using OpenAI's GPT-3 davinci-instruct-beta-v3 model, with the caption randomly generated by giving the model the following prompt:

This is an image name generator

  1. Colourful Shapes
  2. Light All Over
  3. Voronoi Masterpiece
  4. Lucid Dreams
  5. Naughty by Nature
  6. Bad and Beyond
  7. Rainbow Rain

As seen above, point 8 is left intentionally blank as that point will be autocompleted by OpenAI. Pretty cool.
We give OpenAI some examples of image names and it's able to complete our list with a name that could possibly fit in our list. For example, an OpenAI response could look like:

  1. Ominous Fog

Examples

Seed = 220492 Seed = 200495
1 2

Usage

Clone the project

$ git clone https://github.com/tobiade/serendipi-art.git

Install dependencies

$ cd serendipi-art # go into the serendipi-art folder
$ pip install -r requirements.txt # install dependencies

Set environment variables

Firstly, you'll need to get an API key from OpenAI to utilise the OpenAI model. You can do this by creating an account and grabbing your API key from here.

You can then set environment variables by creating a .env file (a file named .env) in the serendipi-art directory like so:

# Flask
FLASK_APP=serendipiart
FLASK_ENV=development

# OpenAI
OPENAI_API_KEY={Insert your API key}

or you could set them in your shell like so:

$ export FLASK_APP=serendipiart
$ export FLASK_ENV=development
$ export OPENAI_API_KEY={Insert your API key}

Run the application

$ flask run

View your masterpiece

Visit http://127.0.0.1:5000/art/{seed value} e.g http://127.0.0.1:5000/art/111023. A different number will generate a different Voronoi image.

Credits

About

Deterministically-generated Voronoi images with random captions from OpenAI.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0