Our website for Bangkit Capstone Project that can predict the level of ripeness of fruits and how much the cost would be.
Clone this repository and go to the cloned folder.
git clone https://github.com/Bangkit2021-0347/fruit-freshness-detector-web.git
cd fruit-freshness-detector-web
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.
heroku login
heroku git:clone -a fruit-freshness-detector-web
cd fruit-freshness-detector-web
git add .
git commit -am "make it better"
git push heroku master
gcloud app deploy
gcloud builds submit --tag gcr.io/PROJECT-ID/fruit-freshness-detector-web
gcloud run deploy --image gcr.io/PROJECT-ID/fruit-freshness-detector-web
Return recognize result as JSON.
URL
/api/recognize
Method:
POST
Content-Type
multipart/form-data
Data Params
image=[file]
Success Response:
{ freshness_level : 100, price : 10000 }
python -m unittest discover tests