-
Notifications
You must be signed in to change notification settings - Fork 0
/
webapp.py
41 lines (27 loc) · 810 Bytes
/
webapp.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
29
30
31
32
33
34
35
36
37
38
39
from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/')
def default():
return render_template('index.html')
@app.route('/home')
def home():
return render_template('index.html')
@app.route('/summ')
def summ():
return render_template('summarize.html')
@app.route('/summarize', methods=['POST', 'GET'])
def func():
#article = request.form['textarea_article']
return render_template('summarize.html')
@app.route('/result', methods=['POST', 'GET'])
def functio():
if request.method == 'POST':
article = request.form['textarea_article']
#
# INSERT LOGIC HERE
#
return render_template('summarize.html', abstract=article)
else:
return "Not done"
if __name__ == '__main__':
app.run(debug = True)