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.14.tar.gz
(23.8 kB
view hashes)
Built Distribution
Close
Hashes for motion_python-0.1.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34f2fa34d909624065fd4ece49cbf22d7d1366cf705014743493bf45ccdd9d6f |
|
MD5 | d4ecf6895821a699ba703b0251a8a665 |
|
BLAKE2b-256 | bf0c6a83a2eb07366c9a8cbdeb996fbbd9f0f0a20aa1dcf81bdbb267447a9da9 |