[09.10.20] Clearer Logging for tweet messages

This commit is contained in:
andrewso 2020-10-09 20:26:01 +01:00
parent 5a6cabd3db
commit 5581960eee

View File

@ -19,11 +19,11 @@ analyser = sentimentAnalyser.get_sentiment()
def tweetPredict():
tweet = request.args.get('tweet')
log("Receiving Tweet to classify {}".format(tweet), 'INFO')
log("Receiving Tweet to classify [{}]".format(tweet), 'INFO')
result = analyser.get_vader_sentiment(tweet)
log("Returning classification result of {}".format(result), 'INFO')
log("Returning classification result of [{}]".format(result), 'INFO')
return json.dumps({'result': result, 'tweet': tweet}), 200, {'ContentType':'application/json'}