improved error reporting when a missing online dependency can't be downloaded

This commit is contained in:
Lincoln Stein
2022-08-17 18:06:30 -04:00
parent c477525036
commit 831bbd7a54
3 changed files with 11 additions and 4 deletions

View File

@ -5,13 +5,13 @@
# two machines must share a common .cache directory.
# this will preload the Bert tokenizer fles
print("preloading bert tokenizer...",end='')
print("preloading bert tokenizer...")
from transformers import BertTokenizerFast
tokenizer = BertTokenizerFast.from_pretrained("bert-base-uncased")
print("...success")
# this will download requirements for Kornia
print("preloading Kornia requirements...",end='')
print("preloading Kornia requirements...")
import kornia
print("...success")