Last active
January 16, 2021 04:53
-
-
Save arihantdaga/b701c780c6b0828eae7f083827c909f8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
from flask import request | |
app = Flask(__name__) | |
from mood_tagging import get_emotion | |
@app.route('/get_emotion', methods=['POST']) | |
def get_emotion_of_text(): | |
if request.method == 'POST': | |
text = request.json.get('text') | |
return get_emotion(text) | |
if __name__ == "__main__": | |
app.run(host ='0.0.0.0', port = 5005, debug = True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment