This commit is contained in:
Maciej Ścigacz 2023-05-30 14:40:33 +02:00
parent 1dca6fd729
commit 14ebbba342

View File

@ -10,9 +10,9 @@ sentiment_service = Blueprint("sentiment_service", __name__)
@sentiment_service.route("/get_sentiment_data", methods=['POST'])
def get_data():
data = request.get_json()
data_clear = clear_data(data) #czyszczenie danych wejsciowych
predicitons = sentiment_prediction(data_clear) #predykcje
count_labels = count_predictions(predicitons) #dane do wykresu
data_clear = clear_data(data) #czyszczenie danych wejsciowych
predicitons = sentiment_prediction(data_clear) #predykcje
count_labels = count_predictions(predicitons) #dane do wykresu
for i in range(0, len(predicitons)):
predicitons[i]['sentence'] = data['sentences'][i]