mirror of
https://github.com/Doctorado-ML/beflask.git
synced 2025-08-16 23:55:52 +00:00
Fix ranking mistakes
This commit is contained in:
@@ -48,9 +48,9 @@ def get_benchmark(score, excel=False, html=False):
|
|||||||
shutil.copytree(src, dst, dirs_exist_ok=True)
|
shutil.copytree(src, dst, dirs_exist_ok=True)
|
||||||
|
|
||||||
def progress(step):
|
def progress(step):
|
||||||
values = [0, 20, 40, 60, 80]
|
values = [0, 40, 60, 80]
|
||||||
if excel:
|
if excel:
|
||||||
values = [0, 40, 60, 80, 100]
|
values = [0, 20, 40, 60, 80, 100]
|
||||||
return values[step]
|
return values[step]
|
||||||
|
|
||||||
benchmark = Benchmark(score=score, visualize=html)
|
benchmark = Benchmark(score=score, visualize=html)
|
||||||
@@ -84,9 +84,15 @@ def get_benchmark(score, excel=False, html=False):
|
|||||||
)
|
)
|
||||||
return
|
return
|
||||||
# copy the results to the static folder
|
# copy the results to the static folder
|
||||||
move_exreport()
|
if html:
|
||||||
|
move_exreport()
|
||||||
excel_payload = (
|
excel_payload = (
|
||||||
"" if not excel else str(Path(benchmark.get_excel_file_name()))
|
"" if not excel else str(Path(benchmark.get_excel_file_name()).name)
|
||||||
|
)
|
||||||
|
html_payload = (
|
||||||
|
""
|
||||||
|
if not html
|
||||||
|
else url_for("static", filename="exreport/exreport_output/report.html")
|
||||||
)
|
)
|
||||||
current_app.logger.info("excel_payload:" + excel_payload)
|
current_app.logger.info("excel_payload:" + excel_payload)
|
||||||
send_message(
|
send_message(
|
||||||
@@ -94,8 +100,6 @@ def get_benchmark(score, excel=False, html=False):
|
|||||||
100,
|
100,
|
||||||
payload={
|
payload={
|
||||||
"excel": excel_payload,
|
"excel": excel_payload,
|
||||||
"html": url_for(
|
"html": html_payload,
|
||||||
"static", filename="exreport/exreport_output/report.html"
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
@@ -112,10 +112,7 @@
|
|||||||
}
|
}
|
||||||
if (msg.message == "Done!") {
|
if (msg.message == "Done!") {
|
||||||
if ($("#excel").is(":checked")) {
|
if ($("#excel").is(":checked")) {
|
||||||
let action = "window.open('/results/download/" + msg.payload.excel +"', '_blank')";
|
$("#excel_button").attr("onclick", "window.open('/results/download/" + msg.payload.excel +"', '_blank')");
|
||||||
alert(action);
|
|
||||||
console.log(action);
|
|
||||||
$("#excel").attr("onclick",action);
|
|
||||||
$("#excel_button").removeAttr("hidden");
|
$("#excel_button").removeAttr("hidden");
|
||||||
}
|
}
|
||||||
if ($("#html").is(":checked")) {
|
if ($("#html").is(":checked")) {
|
||||||
@@ -139,6 +136,7 @@
|
|||||||
$("#status").removeAttr("hidden");
|
$("#status").removeAttr("hidden");
|
||||||
$("#status-alert").removeAttr("hidden");
|
$("#status-alert").removeAttr("hidden");
|
||||||
$(".progress").removeAttr("hidden");
|
$(".progress").removeAttr("hidden");
|
||||||
|
$("#submit").attr("hidden", true);
|
||||||
}
|
}
|
||||||
function send() {
|
function send() {
|
||||||
var data= {
|
var data= {
|
||||||
|
Reference in New Issue
Block a user