Spaces:
Running
Running
File size: 289 Bytes
569f484 |
1 2 3 4 5 6 7 8 9 10 11 12 |
import torch
from PIL import Image
from transformers import AutoModel, AutoTokenizer
import XGBoost_utils
ad = Image.open('Demo/004.jpg')
caption = XGBoost_utils.Caption_Generation(ad)
print(caption)
test_topic = XGBoost_utils.Topic_emb(caption)
print(test_topic.shape)
print(test_topic) |