Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
·
fe91d82
1
Parent(s):
20c203f
Update app.py
Browse files
app.py
CHANGED
|
@@ -255,10 +255,11 @@ def inference(img):
|
|
| 255 |
generated_text_prefix = generate2(model, tokenizer, embed=prefix_embed)
|
| 256 |
return generated_text_prefix
|
| 257 |
|
| 258 |
-
title = "
|
| 259 |
-
description = "demo for
|
| 260 |
-
article = "<p style='text-align: center'><a href='https://
|
| 261 |
|
|
|
|
| 262 |
gr.Interface(
|
| 263 |
inference,
|
| 264 |
gr.inputs.Image(type="file", label="Input"),
|
|
@@ -266,5 +267,6 @@ gr.Interface(
|
|
| 266 |
title=title,
|
| 267 |
description=description,
|
| 268 |
article=article,
|
| 269 |
-
enable_queue=True
|
|
|
|
| 270 |
).launch(debug=True)
|
|
|
|
| 255 |
generated_text_prefix = generate2(model, tokenizer, embed=prefix_embed)
|
| 256 |
return generated_text_prefix
|
| 257 |
|
| 258 |
+
title = "CLIP prefix captioning"
|
| 259 |
+
description = "Gradio demo for CLIP prefix captioning: a simple image captioning model. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
|
| 260 |
+
article = "<p style='text-align: center'><a href='https://github.com/rmokady/CLIP_prefix_caption' target='_blank'>Github Repo</a></p>"
|
| 261 |
|
| 262 |
+
examples=[['water.jpeg']]
|
| 263 |
gr.Interface(
|
| 264 |
inference,
|
| 265 |
gr.inputs.Image(type="file", label="Input"),
|
|
|
|
| 267 |
title=title,
|
| 268 |
description=description,
|
| 269 |
article=article,
|
| 270 |
+
enable_queue=True,
|
| 271 |
+
examples=examples
|
| 272 |
).launch(debug=True)
|