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 hashes)

Uploaded Source

Built Distribution

sculpture-0.1.1-py3-none-any.whl (2.5 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