Update app.py
Browse files
app.py
CHANGED
@@ -108,14 +108,14 @@ with gr.Blocks(css=css) as demo:
|
|
108 |
with gr.Column(scale=2):
|
109 |
btn = gr.Button("↓ Extract ↓")
|
110 |
with gr.Column(scale=1):
|
111 |
-
img3 = gr.Image("snowangel.gif",label=' ').style(rounded=True)
|
112 |
with gr.Row(css='div {margin-left: auto; margin-right: auto; width: 100%;background-image: url("background.gif"); repeat 0 0;}').style():
|
113 |
with gr.Column(scale=2):
|
114 |
imgout = gr.Image(label='Uploaded document:',elem_id="inp")
|
115 |
with gr.Column(scale=1):
|
116 |
jsonout = gr.JSON(label='Extracted information:')
|
117 |
-
imgout.clear(fn=update_status,inputs=state,outputs=[img2,img3])
|
118 |
-
imgout.change(fn=update_status,inputs=state,outputs=[img2,img3])
|
119 |
btn.click(fn=process_document, inputs=inp, outputs=[jsonout,imgout])
|
120 |
|
121 |
demo.launch()
|
|
|
108 |
with gr.Column(scale=2):
|
109 |
btn = gr.Button("↓ Extract ↓")
|
110 |
with gr.Column(scale=1):
|
111 |
+
img3 = gr.Image("snowangel.gif",label=' ',visible=False).style(rounded=True)
|
112 |
with gr.Row(css='div {margin-left: auto; margin-right: auto; width: 100%;background-image: url("background.gif"); repeat 0 0;}').style():
|
113 |
with gr.Column(scale=2):
|
114 |
imgout = gr.Image(label='Uploaded document:',elem_id="inp")
|
115 |
with gr.Column(scale=1):
|
116 |
jsonout = gr.JSON(label='Extracted information:')
|
117 |
+
#imgout.clear(fn=update_status,inputs=state,outputs=[img2,img3])
|
118 |
+
#imgout.change(fn=update_status,inputs=state,outputs=[img2,img3])
|
119 |
btn.click(fn=process_document, inputs=inp, outputs=[jsonout,imgout])
|
120 |
|
121 |
demo.launch()
|