Our website can predict the level of ripeness of fruits and recommend that you should eat or not.
- Python 3
Clone this repository and go to the cloned folder.
git clone https://github.com/PyaeLinn01/fruit-freshness-detector.git
cd fruit-freshness-detector
Create python virtual environment.
pip install virtualenv
virtualenv venv
Initialize virtual environment
source venv/bin/activate
or use this if you are using windows
.\venv\bin\activate
Install dependencies using pip.
pip install -r requirements.txt
run the app with Flask
flask run
and lastly, open http://127.0.0.1:5000/ on your browser.
Return recognize result as JSON.
-
URL
/api/recognize
-
Method:
POST
-
Content-Type
multipart/form-data
-
Data Params
image=[file]
-
Success Response:
- Code: 200
Content:{ freshness_level : 100, price : 10000 }
- Code: 200
python -m unittest discover tests