Spaces:
Runtime error
Runtime error
File size: 1,079 Bytes
dfb84d2 2bdf6af f6d4a75 f0862cf 2155140 2bdf6af dfb84d2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import gradio as gr
from demo import predict
f = open("./descrip.md","r")
description= f.read()
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2205.13724' target='_blank'>Paper Link</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 = description,
article = article).launch()
if __name__ == '__main__':
io.lanuch()
|