darshan8950 commited on
Commit
330716d
·
1 Parent(s): dd7db82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -18,10 +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
- res=" "
22
- for i in captions:
23
- res=res+", "+i
24
- return (res)
25
 
26
  # Set up the Gradio interface
27
  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
 
 
 
22
 
23
  # Set up the Gradio interface
24
  inputs = gr.inputs.Image(type="pil",label="Image")