Skip to content

Commit

Permalink
Use MODEL env var
Browse files Browse the repository at this point in the history
  • Loading branch information
aemr3 committed Nov 12, 2024
1 parent 19f1f82 commit b44ea88
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""

from typing import Any
import os

from celery import Task
from loguru import logger
Expand All @@ -27,7 +28,7 @@ def __call__(self, *args, **kwargs) -> Any:
if not self.model:
# Protecting this in the __call__ method to avoid
# loading the model in the fastapi server process.
self.model = NERModel()
self.model = NERModel(os.getenv("MODEL"))
return self.run(*args, **kwargs)


Expand Down

0 comments on commit b44ea88

Please sign in to comment.