better interface
Browse files80 unmodified lines8182838485868715 unmodified lines10310410510610710810911011111211311411511611711811912012180 unmodified lines)seq_len = gr.Number(value=20, label="Maximum Sequence Length", precision=0, interactive=True)with gr.Column(scale=1):15 unmodified lines],[caption_output],)# iface = gr.Interface(# fn=output_generate,# inputs=gr.Image(label="Input image", type="pil"),# outputs=gr.Text(label="Caption output"),# title="CoCa: Contrastive Captioners",# description=(# """<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># <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>.# <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>"""# ),# article="""""",# examples=[path.as_posix() for path in paths],# )examples = gr.Examples(examples=[path.as_posix() for path in paths],80 unmodified lines8182838485868715 unmodified lines10310410510610710880 unmodified lines)seq_len = gr.Number(value=20, label="Maximum Sequence Length (has to higher than Minimum)", precision=0, interactive=True)with gr.Column(scale=1):15 unmodified lines],[caption_output],)examples = gr.Examples(examples=[path.as_posix() for path in paths],
app.py+1-14