Skip to content

API Service for Palomade App that use tensorflow model (.h5) to predict maturity level of palm fruit.

Notifications You must be signed in to change notification settings

hafizcode02/palomade-ml-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PALOMADE ML API

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

Getting Started

  1. Clone this repository to your local machine:

    git clone https://github.com/CH2-PS324/palomade-ml-api.git
  2. Navigate to the project directory:

    cd palomade-ml-api
  3. Install the dependencies:

    pip install -r requirements.txt

Running the Application

To start the Express.js server and run the database setup:

python main.js

API Endpoints

1. Predict Sawit Bongkahan

  • 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."
         }
     }

2. Predict Sawit Brondolan

  • 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."
         }
     }

About

API Service for Palomade App that use tensorflow model (.h5) to predict maturity level of palm fruit.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.8%
  • Dockerfile 2.2%