Skip to main content

Main backend module, which is used for developing web-app logic and deploying AI model.

Project description

backend-module

Main backend module, which is used for developing web-app logic and deploying AI model.

Usage - Phase 1

Step 1: Install and update Docker and Docker Compose.

Step 2: Put the desired model into your app with the following path:

ml\model\<model_name>

Step 3: Config model name as an environment variable in .env file.

Step 4: Build and run docker

$ docker-compose build
$ docker-compose up -d

Usage - Phase 2

We develop a RESTful web controller into a reusable library between many AI models. With these functionalities: Input model, Define data input, logging, exception handler.

Installing

Delivering and versioning as a PyPi package. Install and update using pip:

$ pip install annhub-python

A simple example

from annhub_python import PyAnn

pyann = PyAnn()

# Define the expected AI model
pyann.set_model("D:\ARI\ANSCENTER\TrainedModel_c++.ann")

# Define which model ID will be used
pyann.set_model_id(5122020)

# Define the input corresponding to the choosen model
pyann.set_input_length(4)

if __name__ == "__main__":
    pyann.run(host = "0.0.0.0", port = 8080, debug = False)

API

The library will product two APIs: health checking, predicting as well as a Swagger UI for API documentation.

GET: /api/v1/health
POST: /api/v1/predict

Swagger UI

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

hello_g-0.1.5.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

hello_g-0.1.5-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

File details

Details for the file hello_g-0.1.5.tar.gz.

File metadata

  • Download URL: hello_g-0.1.5.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.8.8 Windows/10

File hashes

Hashes for hello_g-0.1.5.tar.gz
Algorithm Hash digest
SHA256 8c7a4ad499374d73b24027594f339a0449c74002fca04bb260e724494c8e5be6
MD5 6c01a6a4f4b0ddea46ceb061bbdf8a4b
BLAKE2b-256 92d18c038acbb3320c69a746276e7ca5edeef443489e2231424f8d95774bb7fc

See more details on using hashes here.

File details

Details for the file hello_g-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: hello_g-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 2.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.8.8 Windows/10

File hashes

Hashes for hello_g-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4096cb0ada8795df70b132f2ac16f26c7c85620d25ac1741c56369831e748646
MD5 3f13bb9fc0cb51f98db5287a243db06d
BLAKE2b-256 d648661763f1e056c30a435a41700f4629e2e11c945c48fb7904ae1325c2f7a9

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