Compare commits

..

No commits in common. "master" and "1.0.0-b7" have entirely different histories.

2 changed files with 7 additions and 8 deletions

View File

@ -64,10 +64,10 @@ spec:
imagePullPolicy: Always
resources:
requests:
cpu: 64m
memory: 64Mi
cpu: 32m
memory: 32Mi
limits:
cpu: 128m
cpu: 75m
memory: 64Mi
securityContext:
capabilities:

View File

@ -18,18 +18,17 @@ analyser = sentimentAnalyser.get_sentiment()
@app.route('/sentiment', methods=['GET'])
def tweetPredict():
tweet = request.args.get('tweet')
syncId = request.headers.get('X-CRYPTO-Sync-ID')
log("Receiving Tweet to classify [{}] for [{}]".format(tweet, syncId), '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'}
@app.route('/sentimentProbeTest', methods=['GET'])
def sentimentProbeTest():
def sentimentProbeTrst():
return json.dumps({'result': {'Score': {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0}, 'Compound': 0.0}, 'tweet': 'Fake Text'}), 200, {'ContentType':'application/json'}
def callSentimentAnalyser():
@ -43,7 +42,7 @@ def callProbes():
if __name__ == '__main__':
setup_logging()
log("Starting Sentiment Analyser...", 'INFO')
log("Starting Spam Filter...", 'INFO')
sys.stdout.flush()
Thread(target=callProbes).start()