|
@app.route('/sentence' , methods = ['GET' , 'POST']) |
|
def sentence(): |
|
if request.method == 'POST': |
|
|
|
text = request.form['text'] |
|
|
|
classes = ["Computer_Complexity", "Artificial_Intelligence", "Software", "Computation"] |
|
|
|
colors = ["danger" , "warning" , "info" , "success" ] |
|
categories = dict(zip(classes,colors)) |
|
dominant_class = "Artificial_Intelligence" |
|
|
|
return render_template('response_sentence.html', text=text, categories=categories, dominant_class=dominant_class) |
|
|
|
|
|
return render_template('sentence.html') |