Spaces:
vilarin
/
Running on Zero

vilarin commited on
Commit
d19efee
1 Parent(s): 112152b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -7
app.py CHANGED
@@ -13,7 +13,7 @@ from diffusers.utils import load_image
13
  from PIL import Image
14
  import requests
15
  import transformers
16
- from transformers import AutoTokenizer, T5EncoderModel, PretrainedConfig
17
  from translatepy import Translator
18
 
19
  os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
@@ -59,15 +59,9 @@ text_encoder_3 = T5EncoderModel.from_pretrained(
59
  torch_dtype=torch.float16,
60
  )
61
 
62
- model_config = PretrainedConfig.from_pretrained(
63
- repo,
64
- subfolder="tokenizer_3",
65
- )
66
-
67
  tokenizer_3 = AutoTokenizer.from_pretrained(
68
  repo,
69
  subfolder="tokenizer_3",
70
- config = model_config,
71
  torch_dtype=torch.float16,
72
  )
73
 
 
13
  from PIL import Image
14
  import requests
15
  import transformers
16
+ from transformers import AutoTokenizer, T5EncoderModel
17
  from translatepy import Translator
18
 
19
  os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
 
59
  torch_dtype=torch.float16,
60
  )
61
 
 
 
 
 
 
62
  tokenizer_3 = AutoTokenizer.from_pretrained(
63
  repo,
64
  subfolder="tokenizer_3",
 
65
  torch_dtype=torch.float16,
66
  )
67