Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def generate_caption(processor, model, image, tokenizer=None):
|
|
27 |
generated_ids = model.generate(pixel_values=inputs.pixel_values, max_length=50)
|
28 |
|
29 |
if tokenizer is not None:
|
30 |
-
|
31 |
else:
|
32 |
generated_caption = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
33 |
|
|
|
27 |
generated_ids = model.generate(pixel_values=inputs.pixel_values, max_length=50)
|
28 |
|
29 |
if tokenizer is not None:
|
30 |
+
generated_caption = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
31 |
else:
|
32 |
generated_caption = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
33 |
|