This project demonstrates how to deploy a pre-trained TensorFlow model using TensorFlow Serving (with Docker) and create a Flask-based web interface for making predictions.
- Open a terminal or Command Prompt (as administrator on Windows).
- Run the following command:
docker run -p 8501:8501 --name=pets -v "C:\pets:/models/pets/1" -e MODEL_NAME=pets tensorflow/serving
Note: Replace C:\pets
with your model directory path.
- Create a virtual environment:
python -m venv flaskapp
- Activate the virtual environment:
source flaskapp/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Start the Flask app:
python app.py
Go to http://localhost:5000
in your browser to use the app.
Install all Python dependencies with:
pip install -r requirements.txt