Skip to main content

A small model api template

Project description

Sculpture

This is a template for a small model inference API.

Installation

To install the Sculpture package, run the following command in your terminal:

pip install culpture

Alternatively, you can clone the GitHub repository and install the package from source:

git clone https://github.com/xianyuntang/sculpture.git
cd sculpture
pip install .

Usage

To use this template, follow these steps:

  • Import the Sculpture class from the sculpture module:
from sculpture import Sculpture
  • Define an inference function that takes an input and produces an output:
inference_function = lambda x: x

Replace lambda x: x with your actual inference function.

  • Create a Sculpture instance by passing your inference function to the constructor:
sculpture = Sculpture(inference_function=inference_function)
  • Start the API server by calling the serve method on the Sculpture instance:
sculpture.serve(debug=True)

You can set the debug argument to False if you don't want to see debug messages.

That's it! Your API should now be up and running, ready to receive requests and return predictions.

Project details


Download files

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

Source Distribution

sculpture-0.1.1.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

sculpture-0.1.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file sculpture-0.1.1.tar.gz.

File metadata

  • Download URL: sculpture-0.1.1.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for sculpture-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d3032eb7fc9314d9ffc8811052cc20639f33758be69448897ce3dc96197b77b4
MD5 01646f5717afc59dd2da0ec1ef897d02
BLAKE2b-256 9d50e60cb842417c1938e1d5df3724618af7cab2e41365ac1454ea851b2224f8

See more details on using hashes here.

File details

Details for the file sculpture-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sculpture-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for sculpture-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b2c413f21a70e2ca8728ba31038cc649dab992c3a2336d9972ea53a93350e27c
MD5 cf8669350ea6ad44157b244138cd55b5
BLAKE2b-256 1904354d8702b17809b1e8759ef9695fa6195fad65bbd4ac7ab6d819736f3ce7

See more details on using hashes here.

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