generated from ibm-developer-skills-network/coding-project-template
-
Notifications
You must be signed in to change notification settings - Fork 233
/
server.py
28 lines (24 loc) · 946 Bytes
/
server.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
''' Executing this function initiates the application of sentiment
analysis to be executed over the Flask channel and deployed on
localhost:5000.
'''
# Import Flask, render_template, request from the flask pramework package : TODO
# Import the sentiment_analyzer function from the package created: TODO
#Initiate the flask app : TODO
@app.route("/sentimentAnalyzer")
def sent_analyzer():
''' This code receives the text from the HTML interface and
runs sentiment analysis over it using sentiment_analysis()
function. The output returned shows the label and its confidence
score for the provided text.
'''
# TODO
@app.route("/")
def render_index_page():
''' This function initiates the rendering of the main application
page over the Flask channel
'''
#TODO
if __name__ == "__main__":
''' This functions executes the flask app and deploys it on localhost:5000
'''#TODO