An optical character recognition project of python, Flask framework with Easy-OCR integration. User can upload digital images of writing and select languages then output of the project shows the characters or texts from the digital images as a text format.
Project is created with:
- Python version: 3.10.6
- Flask Framework version: 2.2.2
- Easy-OCR: https://github.com/JaidedAI/EasyOCR
- HTML5
- CSS3
Folder name: sentiment_analysis_api Subfolder and files:
-static - css | style.css - images | Pictures for upload.
-templates | base.html | index.html | upload_image.html | success.html
app.py
Install virtual environment
py -m pip install --user virtualenv
create a virtual environment in OCR directory
python -m venv venv
Start virtual environment:
venv\Scripts\activate
install flask
pip install flask
install easyocr module
pip install easyocr
Now, set the flask app for app.py file
set FLASK_APP=app.py
now, run the file.
flask run
This project will be available at browser with localhost
127.0.0.1:5000 url.
Then follow the procedures input and output.
Output can be found by uploading images.
This program is to learn the flask framework and how to integrate other functionalites to flask app. Future work planned: a) No previous language selection b) Dynamic recognition of the text/characters and output the result.
Thank you. :)