FastAPI App¶
uv_datascience_project_template.app_fastapi_autoencoder
¶
embed(input_data)
¶
Embed fake images using the trained autoencoder.
PARAMETER | DESCRIPTION |
---|---|
input_data
|
Input data containing the number of fake images to embed.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
dict[str, Any]
|
dict[str, Any]: A dictionary containing the embeddings of the fake images. |
Source code in src/uv_datascience_project_template/app_fastapi_autoencoder.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
read_root()
¶
Root endpoint that provides information about the API.
Source code in src/uv_datascience_project_template/app_fastapi_autoencoder.py
33 34 35 36 37 38 39 40 41 42 43 |
|
startup_event()
async
¶
Initialize FastAPI app state on startup.
Source code in src/uv_datascience_project_template/app_fastapi_autoencoder.py
18 19 20 21 22 23 24 |
|
train_model()
¶
Train the autoencoder model.
RETURNS | DESCRIPTION |
---|---|
dict[str, str]
|
dict[str, str]: A message indicating the training status. |
Source code in src/uv_datascience_project_template/app_fastapi_autoencoder.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|