Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
|
@@ -24,21 +24,21 @@ def predict(image,max_length=64, num_beams=4):
|
|
| 24 |
|
| 25 |
input = gr.components.Image(label="Upload your Image", type = 'pil', optional=True)
|
| 26 |
output = gr.components.Textbox(type="text",label="Captions")
|
| 27 |
-
|
| 28 |
|
| 29 |
description="caption generation"
|
| 30 |
title = "Image Captioning using CNN and LSTM"
|
| 31 |
|
| 32 |
-
article = "
|
| 33 |
|
| 34 |
interface = gr.Interface(
|
| 35 |
fn=predict,
|
| 36 |
inputs = input,
|
| 37 |
theme="grass",
|
| 38 |
outputs=output,
|
| 39 |
-
|
| 40 |
title=title,
|
| 41 |
description=description,
|
| 42 |
article = article,
|
| 43 |
)
|
| 44 |
-
interface.launch(
|
|
|
|
| 24 |
|
| 25 |
input = gr.components.Image(label="Upload your Image", type = 'pil', optional=True)
|
| 26 |
output = gr.components.Textbox(type="text",label="Captions")
|
| 27 |
+
examples = [f"example{i}.jpg" for i in range(11,17)]
|
| 28 |
|
| 29 |
description="caption generation"
|
| 30 |
title = "Image Captioning using CNN and LSTM"
|
| 31 |
|
| 32 |
+
article = "Mini project B-12 "
|
| 33 |
|
| 34 |
interface = gr.Interface(
|
| 35 |
fn=predict,
|
| 36 |
inputs = input,
|
| 37 |
theme="grass",
|
| 38 |
outputs=output,
|
| 39 |
+
examples = examples,
|
| 40 |
title=title,
|
| 41 |
description=description,
|
| 42 |
article = article,
|
| 43 |
)
|
| 44 |
+
interface.launch(debug=True)
|