File size: 863 Bytes
a7b5719 5ca4eb6 bd242c1 c33e07b 05dbbf3 9df45a8 79904b0 a7b5719 09ee37f f4695af |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import os
os.system("apt install -y poppler-utils")
os.system("python -m pip install --upgrade pip")
os.system("python -m pip install pdf2image==1.16.3")
os.system("python -m pip install torch==2.1.0")
os.system("python -m pip install 'git+https://github.com/facebookresearch/detectron2.git@898507047cf441a1e4be7a729270961c401c4354'")
os.system("python -m pip install layoutparser==0.3.4 layoutparser[layoutmodels] layoutparser[ocr]")
os.system("python -m pip install Pillow==9.5.0")
os.system("python -m pip install imagehash==4.3.1")
os.system("python -m pip install tensorflow==2.15.0 tensorflow-estimator==2.15.0")
os.system("python -m pip install scikit-learn==1.3.2")
from main import app
model_path = './model/trained_model/model_final.pth'
config_path = './model/trained_model/config.yaml'
app(model_path=model_path, config_path=config_path, debug=True) |