Spaces:
Sleeping
Sleeping
Delete data_structures.py
Browse files- data_structures.py +0 -20
data_structures.py
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
from typing import Optional
|
2 |
-
from urllib.parse import urlparse
|
3 |
-
|
4 |
-
import petals
|
5 |
-
import pydantic
|
6 |
-
|
7 |
-
|
8 |
-
@pydantic.dataclasses.dataclass
|
9 |
-
class ModelInfo(petals.data_structures.ModelInfo):
|
10 |
-
dht_prefix: Optional[str] = None
|
11 |
-
official: bool = True
|
12 |
-
limited: bool = False
|
13 |
-
|
14 |
-
@property
|
15 |
-
def name(self) -> str:
|
16 |
-
return urlparse(self.repository).path.lstrip("/")
|
17 |
-
|
18 |
-
@property
|
19 |
-
def short_name(self) -> str:
|
20 |
-
return self.name.split("/")[-1]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|