wrap transformers import with try/catch
This commit is contained in:
parent
cdf26c55f5
commit
8007393614
|
@ -5,7 +5,11 @@ import os
|
||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
from transformers import PreTrainedTokenizer
|
|
||||||
|
try:
|
||||||
|
from transformers import PreTrainedTokenizer
|
||||||
|
except:
|
||||||
|
print("transformers is not installed")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from unidecode import unidecode
|
from unidecode import unidecode
|
||||||
|
|
Loading…
Reference in New Issue