Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ def predict(image, prompt=None):
|
|
| 18 |
image = image.convert("RGB")
|
| 19 |
|
| 20 |
# Cực kỳ quan trọng: text="" bắt buộc phải có
|
| 21 |
-
inputs = processor(images=image, text=
|
| 22 |
# In debug để kiểm tra input_ids
|
| 23 |
print(">>> input_ids shape:", inputs.input_ids.shape)
|
| 24 |
generated_ids = model.generate(
|
|
|
|
| 18 |
image = image.convert("RGB")
|
| 19 |
|
| 20 |
# Cực kỳ quan trọng: text="" bắt buộc phải có
|
| 21 |
+
inputs = processor(images=image, text=prompt, return_tensors="pt").to(device)
|
| 22 |
# In debug để kiểm tra input_ids
|
| 23 |
print(">>> input_ids shape:", inputs.input_ids.shape)
|
| 24 |
generated_ids = model.generate(
|