A trigger-based framework for creating and executing ML pipelines.
Project description
motion
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)
Built Distribution
Close
Hashes for motion_python-0.1.15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c1306b1bf67c1a0f87af909acc90b9d0c95d25894dd0f3048a717ad64c54898 |
|
MD5 | 99b587d7df7607775347feff2b9dfd24 |
|
BLAKE2b-256 | 3b58c5308c5fb47b6e136125bddcb5c4faafb6bce4f285071bd5e7015e45ea65 |