Spaces:
Runtime error
Runtime error
Mehdi Cherti
commited on
Commit
•
c7f1d48
1
Parent(s):
abdab20
deal with t5 importerror
Browse files- encoder.py +9 -2
encoder.py
CHANGED
@@ -1,5 +1,12 @@
|
|
1 |
-
|
2 |
-
import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
def build_encoder(name, **kwargs):
|
5 |
if name.startswith("google"):
|
|
|
1 |
+
try:
|
2 |
+
import t5
|
3 |
+
except ImportError:
|
4 |
+
pass
|
5 |
+
|
6 |
+
try:
|
7 |
+
import clip_encoder
|
8 |
+
except ImportError:
|
9 |
+
pass
|
10 |
|
11 |
def build_encoder(name, **kwargs):
|
12 |
if name.startswith("google"):
|