This Flask application lets you upload an image and classifies it as “Hot Dog!” or “Not Hot Dog” using a Hugging Face vision model.
- Python 3.8 or newer
git(to clone the repository)- (Optional) CUDA-capable GPU for faster inference
-
Clone the repository
git clone https://github.com/your-username/hotdog.git cd hotdog -
Create and activate a virtual environment
python3 -m venv venv source venv/bin/activate -
Install Python dependencies
pip install -r requirements.txt
You can start the app either via Flask’s CLI or by running the script directly.
export FLASK_APP=app.py
export FLASK_ENV=development
export FLASK_RUN_HOST=0.0.0.0
export FLASK_RUN_PORT=8080
flask runpython app.pyOnce the server is running, open your browser to:
http://127.0.0.1:5000
hotdog/
├── assets/ # Example images for README
├── app.py # Flask application
├── requirements.txt # Python dependencies
├── templates/
│ ├── index.html # Upload form
│ └── result.html # Classification result
└── tests/
├── __init__.py # Package marker for tests
├── images/ # Sample test images
└── test_classification.py # Unittest suite
This runs the real Hugging Face pipeline against your sample images:
python -m unittest discover -v
