import pandas as pd import gradio as gr import easyocr reader = easyocr.Reader(['en']) title = 'Aadhaar' 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' def data(Aadhaar): result = reader.readtext(Aadhaar,detail=0) df=pd.DataFrame(result) o1=df.iloc[7].item() o2=df.iloc[9].item() o3=df.iloc[12].item() o4=df.iloc[13].item() return o1,o2,o3,o4 #return df demo = gr.Interface(data,gr.Image(),'text', title =title, description =description) demo.launch()