Spaces:
Runtime error
Runtime error
Commit
•
d899005
1
Parent(s):
b2aea87
Update app.py
Browse files
app.py
CHANGED
@@ -37,12 +37,14 @@ img#style-image {
|
|
37 |
max-height: 600px;
|
38 |
}
|
39 |
'''
|
|
|
40 |
demo = gr.Blocks(css=css)
|
41 |
with demo:
|
42 |
gr.Markdown('''<h1 id="title">Image Captioning 🖼️</h1>''')
|
43 |
with gr.Column():
|
44 |
input = gr.inputs.Image(label="Upload your Image", type = 'pil', optional=True)
|
45 |
output = gr.outputs.Textbox(type="auto",label="Captions")
|
|
|
46 |
btn = gr.Button("Generate Caption")
|
47 |
btn.click(fn=predict, inputs=input, outputs=output)
|
48 |
|
|
|
37 |
max-height: 600px;
|
38 |
}
|
39 |
'''
|
40 |
+
examples = [f"example{i}.jpg" for i in range(1,7)]
|
41 |
demo = gr.Blocks(css=css)
|
42 |
with demo:
|
43 |
gr.Markdown('''<h1 id="title">Image Captioning 🖼️</h1>''')
|
44 |
with gr.Column():
|
45 |
input = gr.inputs.Image(label="Upload your Image", type = 'pil', optional=True)
|
46 |
output = gr.outputs.Textbox(type="auto",label="Captions")
|
47 |
+
examples = examples
|
48 |
btn = gr.Button("Generate Caption")
|
49 |
btn.click(fn=predict, inputs=input, outputs=output)
|
50 |
|