I trained my model at kaggle. I have model.pth and model.pkl files. How can ı use my model and predict captured frame from opencv . there is my code
cap=cv2.VideoCapture('2_kisi_A.mp4')
delay=0
//defining model example model=torch.load('model.pth')
while(cap.isOpened()):
ret,frame=cap.read()

if delay % 100 == 0:

     //predicting (frame)

      delay+=1



shortly , how can ı define my model and predict my frame with my model . And am ı do preprocessing?