import gradio as gr from demo import predict f = open("./descrip.md","r") description= f.read() article = "

Paper Link

" 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 = description, article = article).launch() if __name__ == '__main__': io.lanuch()