Spaces:
Runtime error
Runtime error
Shaffique Aljoofri
commited on
Commit
·
2c6ebd8
1
Parent(s):
ac0cb78
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,13 +39,14 @@ def captioner(image):
|
|
| 39 |
return result[0]['generated_text']
|
| 40 |
|
| 41 |
gr.close_all()
|
| 42 |
-
demo = gr.Interface(fn=captioner,
|
| 43 |
-
inputs=[gr.Image(label="Upload image", type="pil")],
|
| 44 |
-
outputs=[gr.Textbox(label="Caption")],
|
| 45 |
-
title="Image Captioning with BLIP",
|
| 46 |
-
description="Caption any image using the BLIP model",
|
| 47 |
-
allow_flagging="never",
|
| 48 |
-
examples=["christmas_dog.jpeg", "bird_flight.jpeg", "cow.jpeg"]
|
|
|
|
| 49 |
|
| 50 |
demo.launch()
|
| 51 |
|
|
|
|
| 39 |
return result[0]['generated_text']
|
| 40 |
|
| 41 |
gr.close_all()
|
| 42 |
+
demo = gr.Interface(fn = captioner,
|
| 43 |
+
inputs = [gr.Image(label="Upload image", type="pil")],
|
| 44 |
+
outputs = [gr.Textbox(label="Caption")],
|
| 45 |
+
title = "Image Captioning with BLIP",
|
| 46 |
+
description = "Caption any image using the BLIP model",
|
| 47 |
+
allow_flagging = "never",
|
| 48 |
+
#examples = ["christmas_dog.jpeg", "bird_flight.jpeg", "cow.jpeg"]
|
| 49 |
+
)
|
| 50 |
|
| 51 |
demo.launch()
|
| 52 |
|