ranking working

This commit is contained in:
2023-06-09 01:40:48 +02:00
parent 8a9c2f769c
commit bba590c0a5

View File

@@ -1,23 +1,25 @@
import json import json
import os import os
import shutil import shutil
from pathlib import Path
import xlsxwriter import xlsxwriter
from benchmark.Datasets import Datasets from benchmark.Datasets import Datasets
from benchmark.ResultsBase import StubReport from benchmark.ResultsBase import StubReport
from benchmark.ResultsFiles import Excel, ReportDatasets, Benchmark from benchmark.ResultsFiles import Benchmark, Excel, ReportDatasets
from benchmark.Utils import Files, Folders from benchmark.Utils import Files, Folders
from dotenv import dotenv_values
from flask import ( from flask import (
Blueprint, Blueprint,
current_app, current_app,
redirect,
render_template, render_template,
request, request,
send_file, send_file,
url_for, url_for,
redirect,
) )
from dotenv import dotenv_values
from flask_login import current_user, login_required from flask_login import current_user, login_required
from .forms import RankingForm from .forms import RankingForm
results = Blueprint("results", __name__, template_folder="templates") results = Blueprint("results", __name__, template_folder="templates")
@@ -259,10 +261,6 @@ def ranking():
"partial results for some classifiers", "partial results for some classifiers",
error=f"Key not found {str(e)}", error=f"Key not found {str(e)}",
) )
return redirect( file_name = Path(benchmark.get_excel_file_name()).name
url_for( return redirect(url_for("results.download", file_name=file_name))
"results.download",
file_name=benchmark.get_excel_file_name(),
)
)
return render_template("ranking.html", form=form) return render_template("ranking.html", form=form)