HotdogOrNot is a machine learning project that uses image classification to determine whether an image contains a hotdog or not. This project leverages deep learning models to provide accurate predictions based on the visual content of images.
- Image Classification: Classify images as "hotdog" or "not hotdog" using pre-trained models.
- Web Interface: Simple web interface to upload images and get predictions.
- Model Integration: Easily integrates with Hugging Face's API for model predictions.
Ensure you have Python 3.6+ and pip installed. Clone the repository and install the dependencies:
git clone https://github.com/eriven/HotdogOrNot.git
cd HotdogOrNot
Create a virtual environment and activate it:
python -m venv .venv
source .venv/bin/activate # On Windows use `.venv\Scripts\activate`
Install the required packages:
pip install -r requirements.txt
-
API Keys: Set up your Hugging Face API key. Create a
.env
file in the project root and add your key:HUGGINGFACE_API_KEY=your_huggingface_api_key_here
-
Run the Application: Start the Flask application:
python web.py
The application will be available at
http://127.0.0.1:5000
.
- Upload an Image: Go to
http://127.0.0.1:5000
and use the web interface to upload an image. - Get Prediction: The model will process the image and return whether it is a hotdog or not.
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Hugging Face: For providing the powerful API used in this project.
- Flask: For the lightweight web framework.
- The original Hotdog or Not dataset: Used for model training and validation.