Spaces:
Running
Running
update
Browse files- src/display/utils.py +13 -13
src/display/utils.py
CHANGED
|
@@ -62,25 +62,25 @@ class ModelDetails:
|
|
| 62 |
|
| 63 |
|
| 64 |
class ModelType(Enum):
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
Unknown = ModelDetails(name=""
|
| 70 |
|
| 71 |
def to_str(self, separator=" "):
|
| 72 |
return f"{self.value.symbol}{separator}{self.value.name}"
|
| 73 |
|
| 74 |
@staticmethod
|
| 75 |
def from_str(type):
|
| 76 |
-
if "
|
| 77 |
-
return ModelType.
|
| 78 |
-
if "
|
| 79 |
-
return ModelType.
|
| 80 |
-
if "
|
| 81 |
-
return ModelType.
|
| 82 |
-
if "
|
| 83 |
-
return ModelType.
|
| 84 |
return ModelType.Unknown
|
| 85 |
|
| 86 |
class WeightType(Enum):
|
|
|
|
| 62 |
|
| 63 |
|
| 64 |
class ModelType(Enum):
|
| 65 |
+
vid_llm = ModelDetails(name="Video-LLM")
|
| 66 |
+
img_llm = ModelDetails(name="Image-LLM")
|
| 67 |
+
llm = ModelDetails(name="LLM")
|
| 68 |
+
others = ModelDetails(name="others")
|
| 69 |
+
Unknown = ModelDetails(name="")
|
| 70 |
|
| 71 |
def to_str(self, separator=" "):
|
| 72 |
return f"{self.value.symbol}{separator}{self.value.name}"
|
| 73 |
|
| 74 |
@staticmethod
|
| 75 |
def from_str(type):
|
| 76 |
+
if "Video-LLM" in type:
|
| 77 |
+
return ModelType.vid_llm
|
| 78 |
+
if "Image-LLM" in type:
|
| 79 |
+
return ModelType.img_llm
|
| 80 |
+
if "LLM" in type:
|
| 81 |
+
return ModelType.llm
|
| 82 |
+
if "others" in type:
|
| 83 |
+
return ModelType.others
|
| 84 |
return ModelType.Unknown
|
| 85 |
|
| 86 |
class WeightType(Enum):
|