-
Notifications
You must be signed in to change notification settings - Fork 0
/
flas.py
46 lines (34 loc) · 981 Bytes
/
flas.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
40
41
42
43
44
45
46
from flask import Flask
from flask_cors import CORS
from Prodigy import stats, aggregateStats, allCluster, getResultsData, processInitialData, youtubRec
app = Flask(__name__)
CORS(app)
@app.route('/')
def hello():
return "Hello World!"
@app.route('/classPerformance', methods=['GET'])
def classPerfomance():
getResultsData()
processInitialData()
return stats("0")
# return "Hello World!"
@app.route('/aggregateStats', methods=['GET'])
def aggregateS():
getResultsData()
processInitialData()
return aggregateStats()
# return "Hello World!"
@app.route('/allCluster', methods=['GET'])
def allClust():
getResultsData()
processInitialData()
return allCluster()
# return "Hello World!"
@app.route('/adaptiveLearning', methods=['GET'])
def adaptiveLearning():
getResultsData()
processInitialData()
return youtubRec()
# return "Hello World!"
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0')