This commit is contained in:
Maciej Ścigacz 2023-06-10 13:39:05 +02:00
parent 9346d3afe9
commit c42160d818

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]