XGBoost_Gaze / MiniCPM_V_Test.py
Demo750's picture
Upload folder using huggingface_hub
569f484 verified
raw
history blame contribute delete
289 Bytes
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)