pixano.app.routers.models
get_model(model_name, settings)
async
Get model file by name.
The model file is expected to be in the models directory with the extension .onnx
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name
|
str
|
Model name. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
FileResponse
|
Model file. |
Source code in pixano/app/routers/models.py
get_models(settings)
async
Get all models in the models directory with the extension .onnx
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
list[str]
|
List of models. |