Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ git_model.to(device)
|
|
16 |
blip_model.to(device)
|
17 |
|
18 |
def generate_caption(processor, model, image):
|
19 |
-
inputs = processor(
|
20 |
|
21 |
generated_ids = model.generate(pixel_values=inputs.pixel_values, max_length=50)
|
22 |
|
|
|
16 |
blip_model.to(device)
|
17 |
|
18 |
def generate_caption(processor, model, image):
|
19 |
+
inputs = processor(images=image, return_tensors="pt").to(device)
|
20 |
|
21 |
generated_ids = model.generate(pixel_values=inputs.pixel_values, max_length=50)
|
22 |
|