Handscribe is an online tool that uses the handprint package to extract text from pdf, png, jpg, and jpeg images.
This application uses Docker to containerize its parts. You must have Docker installed on your machine to run this.
Download the files from GitHub
Create a new directory on your machine where you want to run the app and extract the files there.
Navigate to said directory and run the containers together using:
$ docker compose up
This should begin building the containers. Wait for this process to finish.
When the console shows the app running on localhost, click the link that appears to open the app, or navigate to https://localhost:3000
.
app | Server running on port https://localhost:3000
From here, just interact with the form on the homepage, and extract your text from your images!
If you are currently running the docker containers from your terminal, stop them with CTRL+C
Set up and activate a virtual environment in the root directory with:
python3 -m venv env
source env/bin/activate
Once you have activated your virtual environment, install the requisite testing packages with:
pip install -r requirements.txt
If you want to test the machine learning client code, execute:
cd machine-learning-client
Or, if you want to test the web app code, execute:
cd web-app
To run tests with coverage reports, execute in your terminal:
coverage run -m pytest
coverage report -m
Sample coverage report output:
Name Stmts Miss Cover
---------------------------------------
app.py 63 20 68%
tests/__init__.py 0 0 100%
tests/ml_test.py 72 0 100%
---------------------------------------
TOTAL 135 20 85%
Machine learning client code coverage: 57%
Web app code coverage: 80%
Sarah Al-Towaity
Rachel Andoh
Brian Lee
Danilo Montes
Bhavig Pointi
Misha Seo