- The default requirements.txt will install CPU version, Change "requirements.txt" from "TensorFlow" to "TensorFlow-GPU" to Switch to GPU version
- demo.py: An example of how to call a prediction method.
- Install the python 3.6 environment (with pip)
- Install virtualenv
pip3 install virtualenv - Create a separate virtual environment for the project:
virtualenv -p /usr/bin/python3 venv # venv is the name of the virtual environment. cd venv/ # venv is the name of the virtual environment. source bin/activate # to activate the current virtual environment. cd captcha_platform # captcha_platform is the project path.
pip install -r requirements.txt- Place your "model.yaml" in project path, and your model.pb in model folder (create if not exist)
- Deploy as follows
-
Linux Deploy (Linux/Mac):
- Port: 5000
pip install gunicorn gunicorn -c deploy.conf.py flask_server:app- Port: 19951
python flask_server -
Windows Deploy (Windows):
python flask_serverPort: 19951
Deploy:
python3 grpc_server.py
Port: 50054
python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. ./grpc.proto
- captcha_platform
- grpc_server.py
- flask_server.py
- demo.py
- model
- ***Model.pb