[09.10.20] Clearer Logging for tweet messages
This commit is contained in:
parent
5a6cabd3db
commit
5581960eee
@ -19,11 +19,11 @@ analyser = sentimentAnalyser.get_sentiment()
|
|||||||
def tweetPredict():
|
def tweetPredict():
|
||||||
tweet = request.args.get('tweet')
|
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)
|
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'}
|
return json.dumps({'result': result, 'tweet': tweet}), 200, {'ContentType':'application/json'}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user