Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -43,8 +43,10 @@ def process_image_and_text(image_pil, text_input, num_beams, temperature, seed):
|
|
| 43 |
# Load the image using load_image
|
| 44 |
image = load_image(image_pil)
|
| 45 |
|
|
|
|
|
|
|
| 46 |
# Use the provided text input
|
| 47 |
-
model_inputs = processor(images=image, return_tensors="pt").to(
|
| 48 |
device, dtype=torch.bfloat16
|
| 49 |
)
|
| 50 |
input_len = model_inputs["input_ids"].shape[-1]
|
|
|
|
| 43 |
# Load the image using load_image
|
| 44 |
image = load_image(image_pil)
|
| 45 |
|
| 46 |
+
prompt = ""
|
| 47 |
+
|
| 48 |
# Use the provided text input
|
| 49 |
+
model_inputs = processor(text=prompt, images=image, return_tensors="pt").to(
|
| 50 |
device, dtype=torch.bfloat16
|
| 51 |
)
|
| 52 |
input_len = model_inputs["input_ids"].shape[-1]
|