rafaaa2105 commited on
Commit
2581af3
·
verified ·
1 Parent(s): 490ff7b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -46,8 +46,7 @@ def caption(img, min_len, max_len):
46
  return processor.decode(out[0], skip_special_tokens=True)
47
 
48
 
49
- with gr.Blocks as iface:
50
- gr.Interface(fn=caption,
51
  title='Blip Image Captioning Large',
52
  description="[Salesforce/blip-image-captioning-large](https://huggingface.co/Salesforce/blip-image-captioning-large)",
53
  inputs=[gr.Image(type='filepath', label='Image'), gr.Slider(label='Minimum Length', minimum=1, maximum=1000, value=30), gr.Slider(label='Maximum Length', minimum=1, maximum=1000, value=100)],
 
46
  return processor.decode(out[0], skip_special_tokens=True)
47
 
48
 
49
+ iface= gr.Interface(fn=caption,
 
50
  title='Blip Image Captioning Large',
51
  description="[Salesforce/blip-image-captioning-large](https://huggingface.co/Salesforce/blip-image-captioning-large)",
52
  inputs=[gr.Image(type='filepath', label='Image'), gr.Slider(label='Minimum Length', minimum=1, maximum=1000, value=30), gr.Slider(label='Maximum Length', minimum=1, maximum=1000, value=100)],