A proof-of-concept Streamlit application that takes uploaded or linked image files and performs handwriting OCR using the following commercial services:
Set the following environmental variables for the various services:
- GOOGLE_APPLICATION_CREDENTIALS path to JSON file
- AZURE_COMPUTER_VISION_KEY
- AZURE_COMPUTER_VISION_ENDPOINT
- AWS_ACCESS_KEY
- AWS_SECRET_ACCESS_KEY
These values are set in an .env
file.
To run the application on port 80:
- First change user to root
- Populate environment variables by
source .env
- Activate the Python environment by
source py3-env/bin/activate
- Run streamlit in the background
streamlit run app.py --server.address="0.0.0.0" --server.port="80" &
.
To run the application on port 8150 with port-forwarding from Apache:
- Populate environment variables by
source .env
- Activate the Python environment by
source py3-env/bin/activate
- Run streamlit in the background with CORS disabled:
run app.py --server.address="0.0.0.0" --server.enableCORS=false &