Spaces:
Runtime error
Runtime error
Update interface.py
Browse files- interface.py +10 -1
interface.py
CHANGED
@@ -1,7 +1,16 @@
|
|
1 |
import gradio as gr
|
2 |
from demo import predict
|
3 |
|
4 |
-
gr.Interface(fn=predict,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
if __name__ == '__main__':
|
7 |
io.lanuch()
|
|
|
1 |
import gradio as gr
|
2 |
from demo import predict
|
3 |
|
4 |
+
gr.Interface(fn=predict,
|
5 |
+
inputs=[gr.Image(label = 'You can select an example to quickly submit'), "text"],
|
6 |
+
outputs=["text"],
|
7 |
+
examples=[
|
8 |
+
['PDF_val_151.png','How many table objects are located at the top side of figure?'],
|
9 |
+
['PDF_val_90.png', 'Where is the caption of the figure located at?'],
|
10 |
+
['PDF_val_64.png','How many text objects are located at the bottom side of figure?'],
|
11 |
+
['PDF_val_26.png','Are there any title exist?'],
|
12 |
+
['PDF_val_60.png','Where is the caption of the table located at?'],
|
13 |
+
['PDF_val_158.png','Does title objects exist in this page?']]).launch()
|
14 |
|
15 |
if __name__ == '__main__':
|
16 |
io.lanuch()
|