yongyeol commited on
Commit
ad5c75b
Β·
verified Β·
1 Parent(s): 87ed988

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -8,7 +8,10 @@ import os
8
  import tempfile
9
 
10
  # ───── 이미지 캑셔닝 λͺ¨λΈ λ‘œλ”© ─────
11
- caption_model = VisionEncoderDecoderModel.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
 
 
 
12
  feature_extractor = ViTImageProcessor.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
13
  tokenizer = AutoTokenizer.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
14
 
 
8
  import tempfile
9
 
10
  # ───── 이미지 캑셔닝 λͺ¨λΈ λ‘œλ”© ─────
11
+ caption_model = VisionEncoderDecoderModel.from_pretrained(
12
+ "nlpconnect/vit-gpt2-image-captioning",
13
+ safetensors=True # βœ… torch.load() λŒ€μ‹  μ•ˆμ „ν•œ 방식 μ‚¬μš©
14
+ )
15
  feature_extractor = ViTImageProcessor.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
16
  tokenizer = AutoTokenizer.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
17