Models are now loaded in separate endpoints for the inputs to be easier to recognise
15 lines
380 B
Python
15 lines
380 B
Python
import os
|
|
|
|
from source import manager, model, api
|
|
|
|
# create a fastapi application
|
|
application = api.Application()
|
|
|
|
|
|
# create the model controller
|
|
model_controller = manager.ModelManager(application, os.environ["MODEL_LIBRARY"])
|
|
model_controller.register_model_type("python", model.PythonModel)
|
|
model_controller.reload()
|
|
|
|
# serve the application
|
|
application.serve("0.0.0.0", 8000)
|