!DOCTYPE htmlhtmlhead titleTraining and Testing Platformtitleheadbody h2上传训练数据h2 form action=train method=post enctype=multipartform-data input type=file name=training_data accept=csv
<!DOCTYPE html>
<html>
<head>
<title>Training and Testing Platform</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f3f3f3;
margin: 0;
padding: 20px;
}
<pre><code> h2 {
margin-top: 30px;
}
form {
margin-bottom: 20px;
}
input[type="file"] {
margin-top: 10px;
}
input[type="submit"] {
margin-top: 10px;
padding: 10px 20px;
background-color: #4CAF50;
color: white;
border: none;
cursor: pointer;
}
a {
display: inline-block;
margin-top: 10px;
padding: 10px 20px;
background-color: #337ab7;
color: white;
text-decoration: none;
}
#results {
margin-top: 20px;
padding: 10px;
background-color: #fff;
}
.progress-bar {
width: 100%;
height: 20px;
margin-top: 10px;
background-color: #f3f3f3;
border-radius: 4px;
overflow: hidden;
}
.progress {
height: 100%;
background-color: #4CAF50;
transition: width 0.3s ease;
}
</style>
</code></pre>
</head>
<body>
<pre><code><h2>上传训练数据</h2>
<form action="/train" method="post" enctype="multipart/form-data">
<input type="file" name="training_data" accept=".csv">
<input type="submit" value="上传并训练">
</form>
<h2>上传测试样本</h2>
<form action="/test" method="post" enctype="multipart/form-data">
<input type="file" name="test_samples" accept=".csv">
<input type="submit" value="上传并测试">
</form>
<h2>下载训练模型</h2>
<a href="/download_model">下载模型</a>
<h2>下载分类结果</h2>
<a href="/download_results">下载结果</a>
<h2>分类结果</h2>
<div id="results"></div>
<div class="progress-bar">
<div class="progress"></div>
</div>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script>
$(document).ready(function() {
// Update classification results
setInterval(function() {
$.ajax({
url: "/get_results",
type: "GET",
success: function(response) {
$("#results").html(response);
}
});
}, 5000); // Refresh every 5 seconds
// Update progress bar
setInterval(function() {
$.ajax({
url: "/get_progress",
type: "GET",
success: function(response) {
$(".progress").css("width", response + "%");
}
});
}, 1000); // Refresh every 1 second
});
</script>
</code></pre>
</body>
</html
原文地址: https://www.cveoy.top/t/topic/hWj0 著作权归作者所有。请勿转载和采集!