Update app.py
Browse files
app.py
CHANGED
@@ -71,14 +71,15 @@ title = "Demo: Donut 🍩 for invoice header retrieval"
|
|
71 |
with gr.Blocks() as demo:
|
72 |
gr.Markdown(title)
|
73 |
gr.Markdown(description)
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
|
|
78 |
with gr.Column():
|
79 |
out = gr.JSON(label='Extracted information:')
|
80 |
btn = gr.Button("Extract")
|
81 |
-
|
82 |
btn.click(fn=process_document, inputs=inp, outputs=out)
|
83 |
|
84 |
demo.launch()
|
|
|
71 |
with gr.Blocks() as demo:
|
72 |
gr.Markdown(title)
|
73 |
gr.Markdown(description)
|
74 |
+
|
75 |
+
inp = gr.Image(label='Upload invoice here:').style(height=800)
|
76 |
+
with gr.Row().style():
|
77 |
+
with gr.Column(scale=1):
|
78 |
+
gr.Examples([["example.jpg"], ["example_2.jpg"], ["example_3.jpg"]], inputs=[inp])
|
79 |
with gr.Column():
|
80 |
out = gr.JSON(label='Extracted information:')
|
81 |
btn = gr.Button("Extract")
|
82 |
+
|
83 |
btn.click(fn=process_document, inputs=inp, outputs=out)
|
84 |
|
85 |
demo.launch()
|