wrap transformers import with try/catch

This commit is contained in:
patil-suraj 2022-06-16 18:08:21 +02:00
parent cdf26c55f5
commit 8007393614
1 changed files with 5 additions and 1 deletions

View File

@ -5,7 +5,11 @@ import os
from shutil import copyfile
import torch
try:
from transformers import PreTrainedTokenizer
except:
print("transformers is not installed")
try:
from unidecode import unidecode