bidit commited on
Commit
e007b42
·
1 Parent(s): b6a0d48

remove image pre process

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -31,10 +31,10 @@ def caption_youtube(url):
31
 
32
  # Convert the frame to a PIL image and apply the image transformation pipeline
33
  image = Image.fromarray(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
34
- image = image_transforms(image)
35
 
36
- # Add batch dimension to the image tensor
37
- image = image.unsqueeze(0)
38
  inputs = processor(image, return_tensors="pt")
39
  out = model.generate(**inputs)
40
  caption = processor.decode(out[0], skip_special_tokens=True)
 
31
 
32
  # Convert the frame to a PIL image and apply the image transformation pipeline
33
  image = Image.fromarray(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
34
+ # image = image_transforms(image)
35
 
36
+ # # Add batch dimension to the image tensor
37
+ # image = image.unsqueeze(0)
38
  inputs = processor(image, return_tensors="pt")
39
  out = model.generate(**inputs)
40
  caption = processor.decode(out[0], skip_special_tokens=True)