From 86627a9355d6372cb9dc3301ad090e22f1828780 Mon Sep 17 00:00:00 2001 From: Tempest <110401501+1-tempest@users.noreply.github.com> Date: Sun, 19 Jan 2025 07:48:53 -0600 Subject: [PATCH] Update main.py --- machine-learning/app/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/machine-learning/app/main.py b/machine-learning/app/main.py index 71d9ad6ccd7ae..0f50257a4e694 100644 --- a/machine-learning/app/main.py +++ b/machine-learning/app/main.py @@ -77,9 +77,9 @@ async def lifespan(_: FastAPI) -> AsyncGenerator[None, None]: async def preload_models(preload: PreloadModelData) -> None: log.info(f"Preloading models: clip:{preload.clip} facial_recognition:{preload.facial_recognition}") - async def load_models(model_string: str, model_type: "ModelType", model_task: "ModelTask") -> None: - for model in model_string.split(","): - model_name = model.strip() + async def load_models(model_string: str, model_type: ModelType, model_task: ModelTask) -> None: + for model_name in model_string.split(","): + model_name = model_name.strip() model = await model_cache.get(model_name, model_type, model_task) await load(model)