fix return predictions

This commit is contained in:
Maciej Ścigacz 2023-05-27 17:18:28 +02:00
parent cfc9b1c0d8
commit 2f2de698b6

View File

@ -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})