Spaces:
Sleeping
Sleeping
sudhir2016
commited on
Commit
•
1cc9d18
1
Parent(s):
b572013
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,8 @@ import pandas as pd
|
|
2 |
import gradio as gr
|
3 |
import easyocr
|
4 |
reader = easyocr.Reader(['en'])
|
|
|
|
|
5 |
def data(Aadhaar):
|
6 |
result = reader.readtext(Aadhaar,detail=0)
|
7 |
df=pd.DataFrame(result)
|
@@ -11,5 +13,5 @@ def data(Aadhaar):
|
|
11 |
o4=df.iloc[13].item()
|
12 |
return o1,o2,o3,o4
|
13 |
#return df
|
14 |
-
demo = gr.Interface(data,gr.Image(),'text')
|
15 |
demo.launch()
|
|
|
2 |
import gradio as gr
|
3 |
import easyocr
|
4 |
reader = easyocr.Reader(['en'])
|
5 |
+
title = 'Aadhaar'
|
6 |
+
description= '## Demo app to extract name, DOB, gender and Card number from photo of an Indian Aadhaar card. Uses EasyOCR library. Just an example. Tested only on one sample'
|
7 |
def data(Aadhaar):
|
8 |
result = reader.readtext(Aadhaar,detail=0)
|
9 |
df=pd.DataFrame(result)
|
|
|
13 |
o4=df.iloc[13].item()
|
14 |
return o1,o2,o3,o4
|
15 |
#return df
|
16 |
+
demo = gr.Interface(data,gr.Image(),'text', title =title, description =description)
|
17 |
demo.launch()
|