This repository contains a Fresh or Stale Detection application that uses the K-Nearest Neighbors (KNN) algorithm to classify fruits and vegetables. The application can identify the freshness of the following items:
- Apple
- Banana
- Bitter Gourd
- Capsicum
- Orange
- Tomato
The model is trained using the dataset available at Kaggle - Fresh and Stale Images of Fruits and Vegetables.
You can access the live demo of the application here.
To run the application locally, follow these steps:
-
Clone the repository:
git clone https://github.com/bimarakajati/Fresh-or-Stale-Detection.git
-
Install the required dependencies:
cd Fresh-or-Stale-Detection pip install -r requirements.txt
-
Run the Streamlit app:
streamlit run app.py
-
Open your web browser and go to http://localhost:8501.
Make sure you have Python and pip installed on your machine before running the application locally.
The dataset used for training the model is available on Kaggle: Fresh and Stale Images of Fruits and Vegetables. You can explore and download the dataset from Kaggle.
Feel free to explore the code and experiment with different images to see how the model classifies the freshness of fruits and vegetables!