FacVain / dil-asistanim

1 stars 0 forks source link

Develop a Flask app that sends requests to the XMLRoBERTa models #26

Open FacVain opened 4 months ago

FacVain commented 4 months ago

Task Description

Develop a Flask app that sends requests to the XMLRoBERTa models. Create an endpoint that the web server can send the user input to the XMLRoBERTa models. From this endpoint Models, sentiment and tone analysis responses will be returned to the web server as a JSON object.

Implementation Details

Create /predict endpoint that the web server can send the user input to the XMLRoBERTa models. From this endpoint Models, sentiment and tone analysis responses will be returned to the web server as a JSON object with 2 fields.

Design and Tasks

/predict endpoint should get user input from the post request's body. Tokenize the user input and give the tokenized input tensors to models. Get the softmax scores from models and find the maximum score class for sentiment and tone analysis tasks. Return the maximum classes as JSON object.

Expected Output

{ "sentiment": max_sentiment_class as String, "tone": max_tone_class type as String }

Acceptance Criteria

From the given endpoint system should be able to obtain sentiment and tone analysis classification with high performance.

Screenshots