Team CH2-PS324 | Bangkit Capstone Project 2023
# Prerequisites
Before running the application, make sure you have the following installed on your machine:
- [Python 3](https://www.python.org/)
# Tech We Use
- Flask
- Tensorflow
-
Clone this repository to your local machine:
git clone https://github.com/CH2-PS324/palomade-ml-api.git
-
Navigate to the project directory:
cd palomade-ml-api
-
Install the dependencies:
pip install -r requirements.txt
To start the Express.js server and run the database setup:
python main.js
-
Method:
POST
-
Path:
/predict-bongkahan
-
Description: endpoint for predict sawit bongkahan
-
Request Body (form-data):
image = Image (*jpg/png/jpeg)
-
Response Body:
{ "status": { "code": 200, "data": { "classType": "Bongkahan Sawit Matang", "precentase": 100 }, "message": "Success predicting" } }
-
Error Respone:
Error Invalid Format File
{ "status": { "code": 400, "message": "Invalid file format. Please upload a JPG, JPEG, or PNG image." } }
-
Method:
POST
-
Path:
/predict-brondolan
-
Description: endpoint for predict sawit brondolan
-
Request Body (form-data):
image = Image (*jpg/png/jpeg)
-
Response Body:
{ "status": { "code": 200, "data": { "classType": "Brondolan Sawit Matang", "precentase": 100 }, "message": "Success predicting" } }
-
Error Respone:
Error Invalid Format File
{ "status": { "code": 400, "message": "Invalid file format. Please upload a JPG, JPEG, or PNG image." } }