Spaces:
Runtime error
Runtime error
better interface
Browse files
app.py
CHANGED
|
@@ -81,7 +81,7 @@ with gr.Blocks() as iface:
|
|
| 81 |
)
|
| 82 |
|
| 83 |
seq_len = gr.Number(
|
| 84 |
-
value=20, label="Maximum Sequence Length", precision=0, interactive=True
|
| 85 |
)
|
| 86 |
|
| 87 |
with gr.Column(scale=1):
|
|
@@ -103,19 +103,6 @@ with gr.Blocks() as iface:
|
|
| 103 |
],
|
| 104 |
[caption_output],
|
| 105 |
)
|
| 106 |
-
# iface = gr.Interface(
|
| 107 |
-
# fn=output_generate,
|
| 108 |
-
# inputs=gr.Image(label="Input image", type="pil"),
|
| 109 |
-
# outputs=gr.Text(label="Caption output"),
|
| 110 |
-
# title="CoCa: Contrastive Captioners",
|
| 111 |
-
# description=(
|
| 112 |
-
# """<br> An open source implementation of <strong>CoCa: Contrastive Captioners are Image-Text Foundation Models</strong> <a href=https://arxiv.org/abs/2205.01917>https://arxiv.org/abs/2205.01917.</a>
|
| 113 |
-
# <br> Built using <a href=https://github.com/mlfoundations/open_clip>open_clip</a> with an effort from <a href=https://laion.ai/>LAION</a>.
|
| 114 |
-
# <br> For faster inference without waiting in queue, you may duplicate the space and upgrade to GPU in settings.<a href="https://huggingface.co/spaces/laion/CoCa?duplicate=true"> <img style="margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>"""
|
| 115 |
-
# ),
|
| 116 |
-
# article="""""",
|
| 117 |
-
# examples=[path.as_posix() for path in paths],
|
| 118 |
-
# )
|
| 119 |
|
| 120 |
examples = gr.Examples(
|
| 121 |
examples=[path.as_posix() for path in paths],
|
|
|
|
| 81 |
)
|
| 82 |
|
| 83 |
seq_len = gr.Number(
|
| 84 |
+
value=20, label="Maximum Sequence Length (has to higher than Minimum)", precision=0, interactive=True
|
| 85 |
)
|
| 86 |
|
| 87 |
with gr.Column(scale=1):
|
|
|
|
| 103 |
],
|
| 104 |
[caption_output],
|
| 105 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
|
| 107 |
examples = gr.Examples(
|
| 108 |
examples=[path.as_posix() for path in paths],
|