Spaces:
Runtime error
Runtime error
nkasmanoff
commited on
Commit
•
f1f713b
1
Parent(s):
27df4ce
Update app.py
Browse files
app.py
CHANGED
@@ -15,8 +15,8 @@ def predict(image,max_length=64,device='cpu'):
|
|
15 |
pixel_values = processor(images=image, return_tensors="pt").to(device).pixel_values
|
16 |
generated_ids = model.generate(pixel_values=pixel_values, max_length=max_length)
|
17 |
generated_caption = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
18 |
-
|
19 |
-
|
20 |
|
21 |
|
22 |
|
|
|
15 |
pixel_values = processor(images=image, return_tensors="pt").to(device).pixel_values
|
16 |
generated_ids = model.generate(pixel_values=pixel_values, max_length=max_length)
|
17 |
generated_caption = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
18 |
+
|
19 |
+
return generated_caption
|
20 |
|
21 |
|
22 |
|