Giter VIP home page Giter VIP logo

serendipi-art's Introduction

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

serendipi-art's People

Contributors

tobiade avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.