BT
Description: Calculate the trajectory score in breath
URI: /algo/BT
http method: GET
@app.route('/algo/BT/<name>', methods=['GET'])
def BT(name):
if not request.json or 'seq' not in request.json:
return jsonify({"score":-1})
#Tr.VS
seq = request.json['seq']
score_list = []
for rid in seq:
payload = {'rid':rid}
r = requests.get('http://127.0.0.1:5566/datasets/ROI/'+name,params = payload)
score_list.append(r.json()['ROI'][0]['score'])
score = sum(score_list)
return jsonify({"score":score})