demo fix commit
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ def inference(raw_image):
|
|
38 |
image = transform(raw_image).unsqueeze(0).to(device)
|
39 |
with torch.no_grad():
|
40 |
caption = model.generate(image, sample=False, num_beams=1, max_length=60, min_length=5)
|
41 |
-
|
42 |
|
43 |
|
44 |
inputs = [gr.Image(type='pil', interactive=False),]
|
|
|
38 |
image = transform(raw_image).unsqueeze(0).to(device)
|
39 |
with torch.no_grad():
|
40 |
caption = model.generate(image, sample=False, num_beams=1, max_length=60, min_length=5)
|
41 |
+
return caption[0]
|
42 |
|
43 |
|
44 |
inputs = [gr.Image(type='pil', interactive=False),]
|