Skip to content

Latest commit

 

History

History
74 lines (50 loc) · 1.52 KB

HOW.md

File metadata and controls

74 lines (50 loc) · 1.52 KB

How to setup and run this application (development mode)

Table of Contents

  1. Requirements
  2. Clone this repo (READ CAREFULLY)
  3. Set up environment and dependency
  4. Set up AI server
  5. Concurrently run all

Requirements

  • git v2.13+,
  • node,
  • conda,

And, of course, Internet connection (to download dependencies).

On Windows, you would need to run the commands in PowerShell

1. Clone this repo

git clone https://github.com/hnthap/invoice_extraction_webapp --recurse-submodules --depth 1 --branch main
cd invoice_extraction_webapp

2. Set up environment and dependency

npm run setup

3. Set up AI server

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 ../..

4. Concurrently run all

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