File size: 1,090 Bytes
dfb84d2
 
 
f6d4a75
 
f0862cf
 
 
 
 
 
 
 
 
2155140
 
d102e7c
dfb84d2
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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()