Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def predict(image, input_text):
|
|
21 |
|
22 |
input_prompt = f"<image>\n Question: {input_text} Answer: "
|
23 |
image = image.convert("RGB")
|
24 |
-
inputs = processor(text=
|
25 |
inputs = {k: v.to(device) for k, v in inputs.items()}
|
26 |
|
27 |
# change type if pixel_values in inputs to fp16.
|
|
|
21 |
|
22 |
input_prompt = f"<image>\n Question: {input_text} Answer: "
|
23 |
image = image.convert("RGB")
|
24 |
+
inputs = processor(text=input_prompt, images=image, return_tensors="pt")
|
25 |
inputs = {k: v.to(device) for k, v in inputs.items()}
|
26 |
|
27 |
# change type if pixel_values in inputs to fp16.
|