Skip to main content

A trigger-based framework for creating and executing ML pipelines.

Project description

motion

Checked with mypy Code style: black

A framework for building ML applications, using a trigger-based execution model.

Getting Started

You must use Python 3.7. We recommend using poetry to manage your virtual environment and dependencies. You can install poetry here. Once you have poetry installed, clone this repo and run the following command to install the dependencies:

poetry install

Using API

Run motion serve to start the API server from your application directory.

Writing a get request:

const identifier = await fetch('http://localhost:8000/js/set/', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "relation": "query",
    "key_values": {"prompt": "the beach"}
  }),
});

This should return an identifier, like "cb1f1cd1-67d3-40b5-88a1-25e0ba1b0663".

You can then use this identifier to get the result:

const getresponse = await fetch('http://localhost:8000/js/get/', {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "relation": "query",
    "identifier": identifier,
    "keys": [
        "identifier",
        "text_suggestion",
        "catalog_img_id",
        "catalog_img_score",
    ],
    "include_derived": true
  }),
});

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

motion_python-0.1.15.tar.gz (23.9 kB view hashes)

Uploaded Source

Built Distribution

motion_python-0.1.15-py3-none-any.whl (31.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page