Spaces:
Running
Running
Ahsen Khaliq commited on
Commit ·
b971bf6
1
Parent(s): 00a057f
Update app.py
Browse files6 unmodified lines7891011121311 unmodified lines252627282930316 unmodified linesimport torchocr = PaddleOCR(use_angle_cls=True, lang='en',use_gpu=False)torch.hub.download_url_to_file('https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.3/doc/imgs_en/254.jpg', 'receipt.jpg')def inference(img):img_path = img.name11 unmodified linestitle = 'PaddleOCR'description = 'Gradio demo for PaddleOCR. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below.'article = "<p style='text-align: center'><a href='https://www.paddlepaddle.org.cn/hub/scene/ocr'>Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)</a> | <a href='https://github.com/PaddlePaddle/PaddleOCR'>Github Repo</a></p>"examples = [['receipt.jpg']]gr.Interface(inference,gr.inputs.Image(type='file', label='Input'),6 unmodified lines7891011121311 unmodified lines252627282930316 unmodified linesimport torchocr = PaddleOCR(use_angle_cls=True, lang='en',use_gpu=False)torch.hub.download_url_to_file('https://i.imgur.com/2sylF76.jpg', 'example.jpg')def inference(img):img_path = img.name11 unmodified linestitle = 'PaddleOCR'description = 'Gradio demo for PaddleOCR. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below.'article = "<p style='text-align: center'><a href='https://www.paddlepaddle.org.cn/hub/scene/ocr'>Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)</a> | <a href='https://github.com/PaddlePaddle/PaddleOCR'>Github Repo</a></p>"examples = [['example.jpg']]gr.Interface(inference,gr.inputs.Image(type='file', label='Input'),
app.py+2-2