Python Flask Repositories for LLM/OCR and other APIs
To install required Python libraries, use the following command:
pip install -r requirements.txtTo start the Flask server, execute the following command:
python app.pyGet the .env file and add it to the home folder.
If you encounter issues with existing Python packages, you can create a virtual environment.
First, install virtualenv using pip:
pip install virtualenvVerify the virtualenv version:
virtualenv --versionInside the repository folder:
Create a virtual environment named venv:
virtualenv venvActivate the virtual environment:
- For Windows:
venv\Scripts\activate- For Unix or MacOS:
source venv/bin/activateYour command prompt or terminal should now display (venv) to indicate the virtual environment is active.
Check if no packages are installed (optional):
pip listInstall the exact versions of required packages considering dependencies:
pip install -r requirements.txtUse the below command if you have added any new packages
pip freeze > requirements.txtTo exit the virtual environment, use the following command:
deactivate