T-MoENet / tmp2.py
yixin1121's picture
Upload folder using huggingface_hub
513e1fb verified
raw
history blame
423 Bytes
import torch
from Infer import Infer
device = "cuda"
handler = Infer(device)
candidates = ['adjust the tree', 'get away the dust', 'dancing', 'pressed a button to activate', 'presents']
with torch.no_grad():
handler.generate("why did the boy clap his hands when he ran to the christmas tree?",
"/home/qinyixin/workspace/TgMoE/Frozenbilm/demo/videos/4882821564.mp4",
candidates)