Coder Social home page Coder Social logo

gnd / generative-stalagmite Goto Github PK

View Code? Open in Web Editor NEW

This project forked from molnarriso/generative-stalagmite

0.0 0.0 0.0 109 KB

Repository containing code used in the 2023 theatre performance for HaDivadlo

License: MIT License

Python 79.89% HTML 20.11%

generative-stalagmite's Introduction

generative-stalagmite

This uses the Flask web framework.

Setup

  1. If you don’t have Python installed, install it from here.

  2. Clone this repository.

  3. Navigate into the project directory:

    $ cd generative-stalagmite
  4. Create a new virtual environment:

    Linux:

    $ python -m venv venv
  5. Activate the environment

    Linux:

    $ . venv/bin/activate

    Windows:

    > .\venv\Scripts\activate
  6. Install the requirements:

    $ pip install -r requirements.txt
    $ pip install --upgrade openai
  7. Make a copy of the example environment variables file:

    $ cp .env.example .env
  8. Add your API key to the newly created .env file.

  9. Run the app:

    $ flask run

Now go to http://localhost:5000/stalagmite ! Each load of the page will generate a new stalagmite.

In order to batch create images, go to http://localhost:5000/stalagmiteBatch?prompt=stalagmite&num=4. num is the number of images you want to create. OpenAPI support up to 10 images per request, so if you request more than 10, it will be divided into multiple requests. All the retrieved images will be stored in a folder named with current date in PNG format.

Parameters

You can modify several parameters of this app in the .env file.

RESOLUTION=1024 Sets the horizontal and vertical resolution of the output image. Allowed values are 256,512 and 1024.

generative-stalagmite's People

Contributors

gnd avatar molnarriso 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.