v-doc_abstractive_mac / interface.py
ydin0771's picture
Update interface.py
d102e7c
raw
history blame
1.09 kB
import gradio as gr
from demo import predict
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2205.13724' target='_blank'>Paper</a></p>"
gr.Interface(fn=predict,
inputs=[gr.Image(label = 'You can select an example to quickly submit'), "text"],
outputs=["text"],
examples=[
['PDF_val_151.png','How many table objects are located at the top side of figure?'],
['PDF_val_90.png', 'Where is the caption of the figure located at?'],
['PDF_val_64.png','How many text objects are located at the bottom side of figure?'],
['PDF_val_26.png','Are there any title exist?'],
['PDF_val_60.png','Where is the caption of the table located at?'],
['PDF_val_158.png','Does title objects exist in this page?']],
title = 'V-Doc : Visual questions answers with Documents',
description = "<p style='text-align: center'><a href='https://arxiv.org/abs/2205.13724' target='_blank'>Paper Link</a></p>").launch()
if __name__ == '__main__':
io.lanuch()