Spaces:
Runtime error
Runtime error
chats-bug
commited on
Commit
•
76537bc
1
Parent(s):
a95ba86
Added Sample images
Browse files
app.py
CHANGED
@@ -9,6 +9,10 @@ MODELS = {
|
|
9 |
"Blip Base": BlipBaseModel,
|
10 |
}
|
11 |
|
|
|
|
|
|
|
|
|
12 |
def generate_captions(
|
13 |
image,
|
14 |
num_captions,
|
@@ -80,6 +84,7 @@ interface = gr.Interface(
|
|
80 |
outputs=[
|
81 |
gr.components.Textbox(label="Caption"),
|
82 |
],
|
|
|
83 |
title=title,
|
84 |
description=description,
|
85 |
allow_flagging="never",
|
|
|
9 |
"Blip Base": BlipBaseModel,
|
10 |
}
|
11 |
|
12 |
+
torch.hub.download_url_to_file("https://huggingface.co/datasets/chats-bug/test-image-caption-Listed/blob/main/Image1.png", "image1.png")
|
13 |
+
torch.hub.download_url_to_file("https://huggingface.co/datasets/chats-bug/test-image-caption-Listed/blob/main/Image2.png", "image2.png")
|
14 |
+
torch.hub.download_url_to_file("https://huggingface.co/datasets/chats-bug/test-image-caption-Listed/blob/main/Image3.png", "image3.png")
|
15 |
+
|
16 |
def generate_captions(
|
17 |
image,
|
18 |
num_captions,
|
|
|
84 |
outputs=[
|
85 |
gr.components.Textbox(label="Caption"),
|
86 |
],
|
87 |
+
example=[["image1.png"], ["image2.png"], ["image3.png"]],
|
88 |
title=title,
|
89 |
description=description,
|
90 |
allow_flagging="never",
|