- Requirements
- Clone this repo (READ CAREFULLY)
- Set up environment and dependency
- Set up AI server
- Concurrently run all
- git v2.13+,
- node,
- conda,
And, of course, Internet connection (to download dependencies).
On Windows, you would need to run the commands in PowerShell
git clone https://github.com/hnthap/invoice_extraction_webapp --recurse-submodules --depth 1 --branch main
cd invoice_extraction_webapp
npm run setup
Starting at the directory of THIS FILE, run this:
cd third_party/ai_server
# Create and activate new environment
conda create -n invoiceai python=3.10.16 --yes
conda activate invoiceai
# Install gdown (latest version)
pip install gdown --upgrade
# Install vietocr from source
cd vietocr
pip install .
cd ..
# Download weights
python download.py
Then, install PyTorch 2.4.1 following this instruction (using pip is recommended).
Then, run this:
pip install -r requirements.txt
cd ../..
Remember to activate the environment in the previous step, before running this.
npm run dev # To run frontend and backend
npm run ai # To run AI server