Spaces:
Running
Running
| from ObjCharRec import ocr_with_paddle | |
| from textblob import TextBlob | |
| def demo(): | |
| paths = ['Images/download.jpeg', 'Images/download.png', 'Images/hq720.jpg', 'Images/testocr.png'] | |
| l = [] | |
| for img in paths: | |
| text = ocr_with_paddle(img) | |
| txtblob = TextBlob(text) | |
| l.append(str(txtblob.correct())) | |
| return l | |
| if __name__ == "__main__": | |
| print(demo()) |