NLPV commited on
Commit
a175d47
·
verified ·
1 Parent(s): ef66024

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,8 +1,9 @@
1
  import gradio as gr
2
  import easyocr
3
  import re
 
4
 
5
- # Load OCR Reader (supports Hindi and English)
6
  reader = easyocr.Reader(['hi', 'en'], gpu=False)
7
 
8
  def extract_info_from_image(image):
@@ -57,7 +58,7 @@ iface = gr.Interface(
57
  inputs=gr.Image(type="pil"),
58
  outputs="json",
59
  title="जन सुराज सदस्यता OCR Extractor",
60
- description="Upload a scanned जन सुराज form to extract structured data using OCR."
61
  )
62
 
63
  if __name__ == "__main__":
 
1
  import gradio as gr
2
  import easyocr
3
  import re
4
+ from PIL import Image
5
 
6
+ # Load the EasyOCR reader (Hindi + English)
7
  reader = easyocr.Reader(['hi', 'en'], gpu=False)
8
 
9
  def extract_info_from_image(image):
 
58
  inputs=gr.Image(type="pil"),
59
  outputs="json",
60
  title="जन सुराज सदस्यता OCR Extractor",
61
+ description="Upload a scanned जन सुराज form and extract structured information."
62
  )
63
 
64
  if __name__ == "__main__":