Commit
·
90a0d85
1
Parent(s):
330716d
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ def generate_caption(image_file):
|
|
18 |
|
19 |
# Generate captions using the Blip-Caption model
|
20 |
captions = model.generate({"image": image}, use_nucleus_sampling=True, num_captions=5)
|
21 |
-
return captions
|
22 |
|
23 |
# Set up the Gradio interface
|
24 |
inputs = gr.inputs.Image(type="pil",label="Image")
|
|
|
18 |
|
19 |
# Generate captions using the Blip-Caption model
|
20 |
captions = model.generate({"image": image}, use_nucleus_sampling=True, num_captions=5)
|
21 |
+
return captions[0]
|
22 |
|
23 |
# Set up the Gradio interface
|
24 |
inputs = gr.inputs.Image(type="pil",label="Image")
|