AkashDataScience commited on
Commit
3b5d38c
·
1 Parent(s): 0bea06b

Layout changes

Browse files
Files changed (1) hide show
  1. app.py +8 -7
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
- image = gr.Image(width=320, height=320, label="Input Receipt")
45
- ocr_out = gr.Textbox(label="OCR Output", type="text")
46
-
47
- width_ths = gr.Slider(0, 10, 7.7, 0.1, label="Width Threshold to merge bounding boxes")
48
-
49
- submit_btn = gr.Button("Submit")
50
- clear_btn = gr.ClearButton()
 
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])