Upload catalog.py with huggingface_hub
Browse files- catalog.py +5 -1
catalog.py
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
|
|
|
|
|
| 1 |
from .artifact import Artifact, Artifactory, register_atrifactory
|
| 2 |
from .file_utils import get_all_files_in_dir
|
| 3 |
|
| 4 |
-
import os
|
| 5 |
|
| 6 |
class Catalog(Artifactory):
|
| 7 |
name: str = None
|
| 8 |
location: str = None
|
| 9 |
|
|
|
|
| 10 |
try:
|
| 11 |
import unitxt
|
|
|
|
| 12 |
catalog_path = os.path.dirname(unitxt.__file__) + "/catalog"
|
| 13 |
except ImportError:
|
| 14 |
catalog_path = os.path.dirname(__file__) + "/catalog"
|
| 15 |
|
|
|
|
| 16 |
class LocalCatalog(Catalog):
|
| 17 |
name: str = "local"
|
| 18 |
location: str = catalog_path
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
|
| 3 |
from .artifact import Artifact, Artifactory, register_atrifactory
|
| 4 |
from .file_utils import get_all_files_in_dir
|
| 5 |
|
|
|
|
| 6 |
|
| 7 |
class Catalog(Artifactory):
|
| 8 |
name: str = None
|
| 9 |
location: str = None
|
| 10 |
|
| 11 |
+
|
| 12 |
try:
|
| 13 |
import unitxt
|
| 14 |
+
|
| 15 |
catalog_path = os.path.dirname(unitxt.__file__) + "/catalog"
|
| 16 |
except ImportError:
|
| 17 |
catalog_path = os.path.dirname(__file__) + "/catalog"
|
| 18 |
|
| 19 |
+
|
| 20 |
class LocalCatalog(Catalog):
|
| 21 |
name: str = "local"
|
| 22 |
location: str = catalog_path
|