Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
1-tempest authored Jan 19, 2025
1 parent 76c18bf commit 86627a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions machine-learning/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 86627a9

Please sign in to comment.