vtiw commited on
Commit
60ad738
1 Parent(s): f095004

Enhanced UI

Browse files
Files changed (1) hide show
  1. app.py +16 -5
app.py CHANGED
@@ -129,13 +129,24 @@ demo_ocr = gr.Interface(
129
  gr.Image(type="pil"),
130
  gr.Checkbox(label="Apply Grammar Correction"),
131
  gr.Checkbox(label="Apply Spell Check"),
132
- gr.Dropdown(["English","Hindi","Punjabi"],label="Select Language")
133
  ],
134
- outputs=["text", "file", "file"],
135
- title="DocTR OCR with Grammar and Spell Check",
 
 
 
 
136
  description="Upload an image to get the OCR results. Optionally, apply grammar and spell check.",
137
- examples=[["Examples/Book.png"], ["Examples/News.png"], ["Examples/Manuscript.jpg"], ["Examples/Files.jpg"],["Examples/Hindi.jpg"],["Examples/Hindi-manu.jpg"],["Examples/Punjabi_machine.png"]]
138
-
 
 
 
 
 
 
 
139
  )
140
 
141
 
 
129
  gr.Image(type="pil"),
130
  gr.Checkbox(label="Apply Grammar Correction"),
131
  gr.Checkbox(label="Apply Spell Check"),
132
+ gr.Dropdown(["English","Hindi","Punjabi"], label="Select Language", value="English")
133
  ],
134
+ outputs=[
135
+ gr.Textbox(label="OCR Text"),
136
+ gr.File(label="Text file"),
137
+ gr.File(label="Searchable PDF File(English only)")
138
+ ],
139
+ title="OCR with Grammar and Spell Check",
140
  description="Upload an image to get the OCR results. Optionally, apply grammar and spell check.",
141
+ examples=[
142
+ ["Examples/Book.png",False, False, "English"],
143
+ ["Examples/News.png",False, False, "English"],
144
+ ["Examples/Manuscript.jpg",False, False, "English"],
145
+ ["Examples/Files.jpg",False, False, "English"],
146
+ ["Examples/Hindi.jpg",False, False, "Hindi"],
147
+ ["Examples/Hindi-manu.jpg",False, False, "Hindi"],
148
+ ["Examples/Punjabi_machine.png",False, False, "Punjabi"]],
149
+ cache_examples=False
150
  )
151
 
152