Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nextml-code/karlovic
Python library for serving models
https://github.com/nextml-code/karlovic
Last synced: 1 day ago
JSON representation
Python library for serving models
- Host: GitHub
- URL: https://github.com/nextml-code/karlovic
- Owner: nextml-code
- License: apache-2.0
- Created: 2020-10-20T09:42:06.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-15T13:11:17.000Z (about 4 years ago)
- Last Synced: 2024-12-18T01:18:52.220Z (28 days ago)
- Language: Python
- Homepage:
- Size: 43 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
============
Model Server
============NOTE: Currently in beta development. Breaking changes may happen at any time.
The Karlovic library aims to simplify the process of setting up a htts server that serves machine learning models.
Install
=======.. code-block::
pip install karlovic
Usage
=====.. code-block:: python
from karlovic import model_server
def bottle_configuration_function(bottle):
# Configure bottle
passplugins = [
SomePlugin,
...
]app, run_server = model_server(plugins, bottle_configuration_function)
# Use the app decorator to define endpoints
@app.get('/hello')
def hello():
return "Hello World
"@app.post('/world')
def hello(image):
return "some response"use_image_form(app, ['/world'])
# Creates GET '/world/form' that posts an
# image to '/world'run_server()