Update app.py
Browse files
app.py
CHANGED
@@ -66,15 +66,16 @@ article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2111.156
|
|
66 |
|
67 |
gr_image = gr.Image().style( height=800)
|
68 |
|
69 |
-
demo = gr.Interface(
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
|
|
79 |
|
80 |
demo.launch()
|
|
|
66 |
|
67 |
gr_image = gr.Image().style( height=800)
|
68 |
|
69 |
+
#demo = gr.Interface(fn=process_document,inputs=gr_image,outputs="json",title="Demo: Donut 🍩 for invoice header retrieval", description=description,
|
70 |
+
# article=article,enable_queue=True, examples=[["example.jpg"], ["example_2.jpg"], ["example_3.jpg"]], cache_examples=False)
|
71 |
+
|
72 |
+
with gr.Blocks() as demo:
|
73 |
+
gr.Markdown(description)
|
74 |
+
with gr.Row():
|
75 |
+
inp = gr.Image().style(height=800)
|
76 |
+
out = gr.JSON()
|
77 |
+
btn = gr.Button("Run")
|
78 |
+
gr.Examples(["example.jpg"], ["example_2.jpg"], ["example_3.jpg"], inputs=[inp])
|
79 |
+
btn.click(fn=process_document, inputs=inp, outputs=out)
|
80 |
|
81 |
demo.launch()
|