Sentiment Analysis Restful API
power by FastAPI

Prediction Text

POST http://127.0.0.1:8000/predict
body -> raw -> json
{
    "text": "สวัสดี"
}
Respone
{
    "status": "success",
    "data": {
        "sentiment": "neutral",
        "percentage": "56"
    }
}

Prediction Object

POST http://127.0.0.1:8000/predictObject
body -> raw -> json
{
    "data": [
        {
            "Text": "ดีมากๆเลย สินค้านี้ไปหาซื้อกันได้นะ"
        },
        {
            "Text": "เสียดายเงินมาก"
        },
        {
            "Text": "สินค้านี้เหมือนจะดีนะ"
        }
    ]
}
Respone
{
    "status": "success",
    "data": [
        {
            "Text": "ดีมากๆเลย สินค้านี้ไปหาซื้อกันได้นะ",
            "Sentiment": "positive",
            "Percentage": "78"
        },
        {
            "Text": "เสียดายเงินมาก",
            "Sentiment": "negative",
            "Percentage": "98"
        },
        {
            "Text": "สินค้านี้เหมือนจะดีนะ",
            "Sentiment": "neutral",
            "Percentage": "63"
        }
    ]
}