forked from Cutlery/immich
		
	fix(ml): model paths not working (#6705)
* fix str enum string repr * fixed typing
This commit is contained in:
		
							parent
							
								
									be55396086
								
							
						
					
					
						commit
						f52994e8ca
					
				| @ -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" | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user