sudhir2016 commited on
Commit
ace1385
1 Parent(s): 9a5d190

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import pandas as pd
2
  import gradio as gr
3
  import easyocr
4
- reader = easyocr.Reader(['en'])
5
  title = 'Aadhaar'
6
  description= '## Demo app to extract text data from photo of an Indian Aadhaar card. Uses EasyOCR library. Just a PoC. Tested only on photo in example'
7
  def data(Aadhaar):
@@ -9,12 +9,12 @@ def data(Aadhaar):
9
  df=pd.DataFrame(result)
10
  o1=df.iloc[3].item()
11
  o2=df.iloc[4].item()
12
- #o3=df.iloc[5].item()
13
  o4=df.iloc[6].item()
14
  o5=df.iloc[7].item()
15
- #o6=df.iloc[8].item()
16
  o7=df.iloc[9].item()
17
  o8=df.iloc[10].item()
18
- return o1,o2,o4,o5,o7,o8
19
  demo = gr.Interface(data,gr.Image(),'text', title =title, description =description,examples=[['image.png']])
20
  demo.launch()
 
1
  import pandas as pd
2
  import gradio as gr
3
  import easyocr
4
+ reader = easyocr.Reader(['en','hi'])
5
  title = 'Aadhaar'
6
  description= '## Demo app to extract text data from photo of an Indian Aadhaar card. Uses EasyOCR library. Just a PoC. Tested only on photo in example'
7
  def data(Aadhaar):
 
9
  df=pd.DataFrame(result)
10
  o1=df.iloc[3].item()
11
  o2=df.iloc[4].item()
12
+ o3=df.iloc[5].item()
13
  o4=df.iloc[6].item()
14
  o5=df.iloc[7].item()
15
+ o6=df.iloc[8].item()
16
  o7=df.iloc[9].item()
17
  o8=df.iloc[10].item()
18
+ return o1,o2,o3,o4,o5,o6.o7,o8
19
  demo = gr.Interface(data,gr.Image(),'text', title =title, description =description,examples=[['image.png']])
20
  demo.launch()