Copied STUFF from https://github.com/ShaileshDhama/Rotten-v-s-Fresh-Fruit-Detection 🤓
This project is a web application that allows users to upload images of fruits and determines whether the fruit is fresh or rotten.
setup_env.sh
: Bash script to set up the virtual environment and install dependencies.run_app.sh
: Bash script to run the web application and open it in the default browser.requirements.txt
: List of required Python packages.app.py
: Flask web application for handling file uploads and displaying results.upload.html
: HTML template for the file upload page.result.html
: HTML template for displaying prediction results.
Download the dataset from here
-
Clone the repository:
git clone https://github.com/zax4r0/fruit-freshness-detector.git cd fruit-freshness-detector
-
Ensure that you have Python 3 installed on your system.
-
Run the setup script to create a virtual environment and install the necessary dependencies:
chmod +x setup_env.sh ./setup_env.sh
This script will:
- Create a virtual environment named
.venv
. - Activate the virtual environment.
- Install the required packages from
requirements.txt
. - Install Jupyter if it's not already installed.
- Create a virtual environment named
-
After setting up the environment, run the web application script:
chmod +x run_app.sh ./run_app.sh
This script will:
- Activate the virtual environment.
- Start the Flask web application.
- Open the default web browser to
http://127.0.0.1:5000/
.
-
You can now use the web application to upload images and see the freshness prediction.
If you would like to contribute to this project, please fork the repository and submit a pull request.
This project is licensed under the MIT License. See the LICENSE
file for details.