Skip to content

pixano_inference.routers.app

API routes for the app.

get_list_models(settings) async

List all models available in the app.

Source code in pixano_inference/routers/app.py
@router.get("/models/", response_model=list[ModelInfo])
async def get_list_models(
    settings: Annotated[Settings, Depends(get_pixano_inference_settings)],
) -> list[ModelInfo]:
    """List all models available in the app."""
    models = [ModelInfo(name=model_name, task=task) for model_name, task in settings.models_to_task.items()]
    return models

get_settings(settings) async

Get the current settings of the app.

Source code in pixano_inference/routers/app.py
@router.get("/settings/", response_model=Settings)
async def get_settings(
    settings: Annotated[Settings, Depends(get_pixano_inference_settings)],
) -> Settings:
    """Get the current settings of the app."""
    return settings