broad (small) changes to make style of all routes and jobs to be consistent, e.g. use underscords between words
This commit is contained in:
8
ai.py
8
ai.py
@@ -18,11 +18,11 @@ from face import Face, FaceFileLink, FaceRefimgLink, FaceNoMatchOverride, FaceFo
|
||||
# pylint: disable=no-member
|
||||
|
||||
################################################################################
|
||||
# /aistats -> placholder for some sort of stats
|
||||
# /ai_stats -> placholder for some sort of stats
|
||||
################################################################################
|
||||
@app.route("/aistats", methods=["GET"])
|
||||
@app.route("/ai_stats", methods=["GET"])
|
||||
@login_required
|
||||
def aistats():
|
||||
def ai_stats():
|
||||
stats = db.session.execute( "select p.tag, count(f.id) from person p, face f, face_file_link ffl, face_refimg_link frl, person_refimg_link prl where p.id = prl.person_id and prl.refimg_id = frl.refimg_id and frl.face_id = ffl.face_id and ffl.face_id = f.id group by p.tag order by 2 desc" )
|
||||
cnt_res = db.session.execute( "select count(1) from ( select p.tag from person p, face f, face_file_link ffl, face_refimg_link frl, person_refimg_link prl where p.id = prl.person_id and prl.refimg_id = frl.refimg_id and frl.face_id = ffl.face_id and ffl.face_id = f.id group by p.tag ) as foo" )
|
||||
num_stats=cnt_res.first()[0]
|
||||
@@ -38,7 +38,7 @@ def aistats():
|
||||
fstats['all_matched_faces'] = db.session.execute( "select count(distinct face_id) as count from face_refimg_link" ).first()[0]
|
||||
fstats['all_unmatched_faces'] = db.session.execute( "select count(f.id) from face f left join face_refimg_link frl on f.id = frl.face_id where frl.refimg_id is null" ).first()[0]
|
||||
|
||||
return render_template("aistats.html", page_title='AI Statistics', stats=stats, num_stats=num_stats, fstats=fstats )
|
||||
return render_template("ai_stats.html", page_title='AI Statistics', stats=stats, num_stats=num_stats, fstats=fstats )
|
||||
|
||||
|
||||
################################################################################
|
||||
|
||||
Reference in New Issue
Block a user