<!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=&quot;file&quot;] {
        margin-top: 10px;
    }

    input[type=&quot;submit&quot;] {
        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;
    }
&lt;/style&gt;
</code></pre>
</head>
<body>
<pre><code>&lt;h2&gt;上传训练数据&lt;/h2&gt;
&lt;form action=&quot;/train&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;
    &lt;input type=&quot;file&quot; name=&quot;training_data&quot; accept=&quot;.csv&quot;&gt;
    &lt;input type=&quot;submit&quot; value=&quot;上传并训练&quot;&gt;
&lt;/form&gt;

&lt;h2&gt;上传测试样本&lt;/h2&gt;
&lt;form action=&quot;/test&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;
    &lt;input type=&quot;file&quot; name=&quot;test_samples&quot; accept=&quot;.csv&quot;&gt;
    &lt;input type=&quot;submit&quot; value=&quot;上传并测试&quot;&gt;
&lt;/form&gt;

&lt;h2&gt;下载训练模型&lt;/h2&gt;
&lt;a href=&quot;/download_model&quot;&gt;下载模型&lt;/a&gt;

&lt;h2&gt;下载分类结果&lt;/h2&gt;
&lt;a href=&quot;/download_results&quot;&gt;下载结果&lt;/a&gt;

&lt;h2&gt;分类结果&lt;/h2&gt;
&lt;div id=&quot;results&quot;&gt;&lt;/div&gt;

&lt;div class=&quot;progress-bar&quot;&gt;
    &lt;div class=&quot;progress&quot;&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;script src=&quot;https://code.jquery.com/jquery-3.4.1.min.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
    $(document).ready(function() {
        // Update classification results
        setInterval(function() {
            $.ajax({
                url: &quot;/get_results&quot;,
                type: &quot;GET&quot;,
                success: function(response) {
                    $(&quot;#results&quot;).html(response);
                }
            });
        }, 5000); // Refresh every 5 seconds

        // Update progress bar
        setInterval(function() {
            $.ajax({
                url: &quot;/get_progress&quot;,
                type: &quot;GET&quot;,
                success: function(response) {
                    $(&quot;.progress&quot;).css(&quot;width&quot;, response + &quot;%&quot;);
                }
            });
        }, 1000); // Refresh every 1 second
    });
&lt;/script&gt;
</code></pre>
</body>
</html
!DOCTYPE htmlhtmlhead titleTraining and Testing Platformtitleheadbody h2上传训练数据h2 form action=train method=post enctype=multipartform-data input type=file name=training_data accept=csv

原文地址: https://www.cveoy.top/t/topic/hWj0 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录