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)