Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,6 +29,10 @@ inputs = processor(
|
|
| 29 |
return_tensors="pt",
|
| 30 |
).to(device)
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
# Inference
|
| 33 |
generated_ids = model.generate(**inputs, max_new_tokens=128)
|
| 34 |
|
|
|
|
| 29 |
return_tensors="pt",
|
| 30 |
).to(device)
|
| 31 |
|
| 32 |
+
# Check the number of tokens generated by the processor and the shape of inputs
|
| 33 |
+
print("Input tokens:", inputs.input_ids.shape)
|
| 34 |
+
print("Image features shape:", inputs.pixel_values.shape)
|
| 35 |
+
|
| 36 |
# Inference
|
| 37 |
generated_ids = model.generate(**inputs, max_new_tokens=128)
|
| 38 |
|