- Install tesseract-ocr for the platform on which the application is being run
First you should install binary:
On Linux
sudo apt-get update
sudo apt-get install libleptonica-dev tesseract-ocr tesseract-ocr-dev libtesseract-dev python3-pil tesseract-ocr-eng tesseract-ocr-script-latn
On Mac
brew install tesseract
On Windows
download binary from https://github.com/UB-Mannheim/tesseract/wiki. then add pytesseract.pytesseract.tesseract_cmd = 'C:\Program Files (x86)\Tesseract-OCR\tesseract.exe' to your script.
references: https://pypi.org/project/pytesseract/ (INSTALLATION section) and https://tesseract-ocr.github.io/tessdoc/Installation.html
- pip install -r requirements.txt
- (Optional) For locally hosted llama gpt, install docker on your system, then run the following commands docker pull ollama/ollama docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama docker exec -it ollama ollama run llama3 After running the last command, llama3 model will start downloading.
- Add OpenAI api key in settings file in the variable OPENAI_API_KEY
- python manage.py makemigrations
- python manage.py migrate
- python add_permission.py
- python populate.py
- python manage.py runserver