Update app.py
Browse files
app.py
CHANGED
|
@@ -17,7 +17,9 @@ def predict(image, question=None):
|
|
| 17 |
image = image.convert("RGB")
|
| 18 |
image = image.resize((1280, 960)) # Resize nαΊΏu cαΊ§n
|
| 19 |
|
| 20 |
-
inputs = processor(images=image, return_tensors="pt").to(device)
|
|
|
|
|
|
|
| 21 |
|
| 22 |
generated_ids = model.generate(
|
| 23 |
**inputs,
|
|
|
|
| 17 |
image = image.convert("RGB")
|
| 18 |
image = image.resize((1280, 960)) # Resize nαΊΏu cαΊ§n
|
| 19 |
|
| 20 |
+
#inputs = processor(images=image, return_tensors="pt").to(device)
|
| 21 |
+
inputs = processor(images=image, text="", return_tensors="pt").to(device)
|
| 22 |
+
|
| 23 |
|
| 24 |
generated_ids = model.generate(
|
| 25 |
**inputs,
|