Spaces:
Running
Running
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) |