mirror of
https://github.com/immich-app/immich.git
synced 2024-12-28 22:51:59 +00:00
fix(ml): model paths not working (#6705)
* fix str enum string repr * fixed typing
This commit is contained in:
parent
be55396086
commit
f52994e8ca
1 changed files with 9 additions and 2 deletions
|
@ -6,6 +6,13 @@ import numpy.typing as npt
|
|||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class StrEnum(str, Enum):
|
||||
value: str
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.value
|
||||
|
||||
|
||||
class TextResponse(BaseModel):
|
||||
__root__: str
|
||||
|
||||
|
@ -21,12 +28,12 @@ class BoundingBox(TypedDict):
|
|||
y2: int
|
||||
|
||||
|
||||
class ModelType(str, Enum):
|
||||
class ModelType(StrEnum):
|
||||
CLIP = "clip"
|
||||
FACIAL_RECOGNITION = "facial-recognition"
|
||||
|
||||
|
||||
class ModelRuntime(str, Enum):
|
||||
class ModelRuntime(StrEnum):
|
||||
ONNX = "onnx"
|
||||
ARMNN = "armnn"
|
||||
|
||||
|
|
Loading…
Reference in a new issue