Giter Site home page Giter Site logo

leguiart / genml_webapi Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.6 MB

Flask wep app that serves the purpose of an API for a mixture of Generative ML tasks with a Computational Creativity and Game AI in mind.

License: MIT License

Python 100.00%

genml_webapi's Introduction

GenML_WebAPI

Flask wep app that serves the purpose of an API for a mixture of Generative ML tasks with a Computational Creativity and Game AI in mind.

Running locally

  • Install library requirements from the requirements.txt file. pip install -r requirements.txt

  • Run the Flask web app: python app.py

Getting images (GET)

Single image.

  • /SingleImage Get a single generated image in a JSON response with the following signature:
    {
        "format": "image format (.png, .jpg, etc.)",
        "img": "a string representing an image in base64 format",
        "msg": "output message",
        "size": [width, height]
    }
    
  • /SingleImageBrowser You can open in a browser to see a generated image

Image batch:

  • /ImageBatch/<batch_size> Get generated images in a JSON response with the following signature:

    {
        "format": "image format (.png, .jpg, etc.)",
        "imgs": ["a list of strings representing images in base64 format"],
        "msg": "output message",
        "size": [width, height]
    }
    
  • /ImageBatchBrowser/<batch_size> You can open in a browser to see <batch_size> generated images

Uploading images (POST)

Image batch:

Upload a set of images and get back an evolved set of images of <batch_size>.

Expects multipart/form-data with the following structure:

["selected_images" : [file_list],
"batch_size" : batch_size]
  • /ImageBatch Response has the same structure as GET action for this endpoint

  • /ImageBatchBrowser You can open in a browser to see <batch_size> generated images

genml_webapi's People

Contributors

leguiart avatar

Watchers

 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.