Spaces:
Runtime error
Runtime error
Commit
Β·
3b5d38c
1
Parent(s):
0bea06b
Layout changes
Browse files
app.py
CHANGED
|
@@ -41,13 +41,14 @@ examples = [["data/receipt_00000.JPG", 7.7],
|
|
| 41 |
with gr.Blocks() as demo:
|
| 42 |
gr.Markdown(f"# {title}\n{description}")
|
| 43 |
with gr.Row():
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
|
|
|
| 51 |
|
| 52 |
submit_btn.click(inference, inputs=[image, width_ths], outputs=ocr_out)
|
| 53 |
clear_btn.click(lambda: [None, 7.7], inputs=[image, width_ths])
|
|
|
|
| 41 |
with gr.Blocks() as demo:
|
| 42 |
gr.Markdown(f"# {title}\n{description}")
|
| 43 |
with gr.Row():
|
| 44 |
+
with gr.Column():
|
| 45 |
+
image = gr.Image(width=320, height=320, label="Input Receipt")
|
| 46 |
+
width_ths = gr.Slider(0, 10, 7.7, 0.1, label="Width Threshold to merge bounding boxes")
|
| 47 |
+
with gr.Row():
|
| 48 |
+
submit_btn = gr.Button("Submit")
|
| 49 |
+
clear_btn = gr.ClearButton()
|
| 50 |
+
with gr.Column():
|
| 51 |
+
ocr_out = gr.Textbox(label="OCR Output", type="text")
|
| 52 |
|
| 53 |
submit_btn.click(inference, inputs=[image, width_ths], outputs=ocr_out)
|
| 54 |
clear_btn.click(lambda: [None, 7.7], inputs=[image, width_ths])
|