Spaces:
Runtime error
Runtime error
ShreyMehra
commited on
Update app.py
Browse files
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 |
|