Upload __init__.py with huggingface_hub
Browse files- __init__.py +32 -0
__init__.py
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import TYPE_CHECKING
|
2 |
+
|
3 |
+
from transformers.utils import (
|
4 |
+
OptionalDependencyNotAvailable,
|
5 |
+
_LazyModule,
|
6 |
+
is_torch_available,
|
7 |
+
)
|
8 |
+
|
9 |
+
_import_structure = {
|
10 |
+
"configuration_brainiac": ["BrainiacConfig"],
|
11 |
+
}
|
12 |
+
|
13 |
+
try:
|
14 |
+
if not is_torch_available():
|
15 |
+
raise OptionalDependencyNotAvailable()
|
16 |
+
except OptionalDependencyNotAvailable:
|
17 |
+
pass
|
18 |
+
else:
|
19 |
+
_import_structure["modeling_brainiac"] = ["BrainiacModel"]
|
20 |
+
|
21 |
+
if TYPE_CHECKING:
|
22 |
+
from .configuration_brainiac import BrainiacConfig
|
23 |
+
from .modeling_brainiac import BrainiacModel
|
24 |
+
|
25 |
+
else:
|
26 |
+
import sys
|
27 |
+
sys.modules[__name__] = _LazyModule(
|
28 |
+
__name__,
|
29 |
+
globals()["__file__"],
|
30 |
+
_import_structure,
|
31 |
+
module_spec=__spec__,
|
32 |
+
)
|