1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-29 15:11:58 +00:00

fix(ml): model paths not working (#6705)

* fix str enum string repr

* fixed typing
This commit is contained in:
Mert 2024-01-28 15:54:33 -05:00 committed by GitHub
parent be55396086
commit f52994e8ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,6 +6,13 @@ import numpy.typing as npt
from pydantic import BaseModel from pydantic import BaseModel
class StrEnum(str, Enum):
value: str
def __str__(self) -> str:
return self.value
class TextResponse(BaseModel): class TextResponse(BaseModel):
__root__: str __root__: str
@ -21,12 +28,12 @@ class BoundingBox(TypedDict):
y2: int y2: int
class ModelType(str, Enum): class ModelType(StrEnum):
CLIP = "clip" CLIP = "clip"
FACIAL_RECOGNITION = "facial-recognition" FACIAL_RECOGNITION = "facial-recognition"
class ModelRuntime(str, Enum): class ModelRuntime(StrEnum):
ONNX = "onnx" ONNX = "onnx"
ARMNN = "armnn" ARMNN = "armnn"