CVPR/v-doc_abstractive_mac
4
1import gradio as gr2from demo import predict3 4f = open("./descrip.md","r")5description= f.read()6article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2205.13724' target='_blank'>Paper Link</a></p>"7 8gr.Interface(fn=predict, 9 inputs=[gr.Image(label = 'You can select an example to quickly submit'), "text"], 10 outputs=["text"],11 examples=[12 ['PDF_val_151.png','How many table objects are located at the top side of figure?'],13 ['PDF_val_90.png', 'Where is the caption of the figure located at?'],14 ['PDF_val_64.png','How many text objects are located at the bottom side of figure?'],15 ['PDF_val_26.png','Are there any title exist?'],16 ['PDF_val_60.png','Where is the caption of the table located at?'],17 ['PDF_val_158.png','Does title objects exist in this page?']],18 title = 'V-Doc : Visual questions answers with Documents',19 description = description,20 article = article).launch()21 22if __name__ == '__main__':23 io.lanuch()24 