ShreyMehra commited on
Commit
258046b
·
unverified ·
1 Parent(s): 7d5edad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -34,8 +34,13 @@ class UI:
34
 
35
  print(2)
36
  pixel_values = inputs.pixel_values
37
-
38
  print(3)
 
 
 
 
 
39
  generated_ids = model.generate(pixel_values=pixel_values, max_length=25)
40
  generated_caption = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
41
 
 
34
 
35
  print(2)
36
  pixel_values = inputs.pixel_values
37
+
38
  print(3)
39
+ pixel_values = pixel_values.to(torch.float32)
40
+
41
+ print(4)
42
+ model = model.to(torch.float32)
43
+
44
  generated_ids = model.generate(pixel_values=pixel_values, max_length=25)
45
  generated_caption = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
46