diff --git a/evaluate_server.py b/evaluate_server.py index 2589baa..0c73cb2 100644 --- a/evaluate_server.py +++ b/evaluate_server.py @@ -62,7 +62,11 @@ def charts(): @app.route('/metrics', methods=['GET']) def metrics(): type = request.args.get('type') - baselines = Baseline.select().order_by(Baseline.rank.desc()).limit(3) + baseline = request.args.get('baseline') + if baseline is None: + baselines = Baseline.select().order_by(Baseline.rank.desc()).limit(3) + else: + baselines = Baseline.select().where(Baseline.rank <= baseline).order_by(Baseline.rank.desc()).limit(3) metrics = {} for i in range(len(baselines)): baseline = baselines[i]