sahilbargotra commited on
Commit
8db24db
·
verified ·
1 Parent(s): 7303824

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -8
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import os
2
  import glob
3
  import gradio as gr
4
- from predict_cheque_parser import parse_cheque_with_donut
5
 
6
  ##Create list of examples to be loaded
7
  example_list = glob.glob("examples/cheque_parser/*")
@@ -27,10 +27,15 @@ with demo:
27
  This model can be further trained to parse additional details like MICR Code, Cheque Number, Account Number, etc. \
28
  Additionally, the app compares if the extracted legal & courtesy amount are matching which is an important check done during approval process of cheques. \
29
  It also checks if the cheque is stale. A cheque is considered stale if it is presented to the bank 3 months after the date mentioned on the cheque.")
30
- with gr.Box():
31
- gr.Markdown("**Upload Cheque**")
32
- input_image_parse = gr.Image(type='filepath', label="Input Cheque")
33
- with gr.Box():
 
 
 
 
 
34
  gr.Markdown("**Parsed Cheque Data**")
35
 
36
  payee_name = gr.Textbox(label="Payee Name")
@@ -42,7 +47,7 @@ with demo:
42
  amts_matching = gr.Checkbox(label="Legal & Courtesy Amount Matching")
43
  stale_check = gr.Checkbox(label="Stale Cheque")
44
 
45
- with gr.Box():
46
  gr.Markdown("**Predict**")
47
  with gr.Row():
48
  parse_cheque = gr.Button("Call Donut 🍩")
@@ -54,6 +59,5 @@ with demo:
54
 
55
  parse_cheque.click(parse_cheque_with_donut, inputs=input_image_parse, outputs=[payee_name,amt_in_words,amt_in_figures,bank_name,cheque_date,amts_matching,stale_check])
56
 
57
- gr.Markdown('\n Solution built by: <a href=\"https://twitter.com/singhshiviii/\">Shivalika Singh</a>')
58
 
59
- demo.launch()
 
1
  import os
2
  import glob
3
  import gradio as gr
4
+ #from predict_cheque_parser import parse_cheque_with_donut
5
 
6
  ##Create list of examples to be loaded
7
  example_list = glob.glob("examples/cheque_parser/*")
 
27
  This model can be further trained to parse additional details like MICR Code, Cheque Number, Account Number, etc. \
28
  Additionally, the app compares if the extracted legal & courtesy amount are matching which is an important check done during approval process of cheques. \
29
  It also checks if the cheque is stale. A cheque is considered stale if it is presented to the bank 3 months after the date mentioned on the cheque.")
30
+ with gr.Group():
31
+ gr.Markdown("**Upload Cheque**")
32
+ input_image_parse = gr.Image(type='filepath', label="Input Cheque")
33
+
34
+
35
+ #with gr.Box():
36
+ #gr.Markdown("**Upload Cheque**")
37
+ #input_image_parse = gr.Image(type='filepath', label="Input Cheque")
38
+ with gr.Group():
39
  gr.Markdown("**Parsed Cheque Data**")
40
 
41
  payee_name = gr.Textbox(label="Payee Name")
 
47
  amts_matching = gr.Checkbox(label="Legal & Courtesy Amount Matching")
48
  stale_check = gr.Checkbox(label="Stale Cheque")
49
 
50
+ with gr.Group():
51
  gr.Markdown("**Predict**")
52
  with gr.Row():
53
  parse_cheque = gr.Button("Call Donut 🍩")
 
59
 
60
  parse_cheque.click(parse_cheque_with_donut, inputs=input_image_parse, outputs=[payee_name,amt_in_words,amt_in_figures,bank_name,cheque_date,amts_matching,stale_check])
61
 
 
62
 
63
+ demo.launch(share=True)