diff --git a/application/services/sentiment_service.py b/application/services/sentiment_service.py index 26b82c0..256dd53 100644 --- a/application/services/sentiment_service.py +++ b/application/services/sentiment_service.py @@ -13,4 +13,8 @@ def get_data(): predicitons = sentiment_prediction(data['sentences']) #predykcje count_labels = count_predictions(predicitons) #dane do wykresu + for i in range(0, len(predicitons)): + predicitons[i]['sentence'] = data['sentences'][i] + predicitons[i]['label'] = predicitons[i]['label'][6:] + return jsonify({"predictions": predicitons, "count_labels": count_labels}) \ No newline at end of file