File size: 2,275 Bytes
3365d41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html>
<html>
<head>
    <title>ECG Arrhythmia Classification</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 20px;
            background-color: #f4f4f4;
        }
        h1 {
            text-align: center;
            color: #333;
        }
        .container {
            max-width: 600px;
            margin: auto;
            background: white;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
        }
        input[type=file] {
            margin: 10px 0;
        }
        input[type=submit] {
            background-color: #4CAF50;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }
        input[type=submit]:hover {
            background-color: #45a049;
        }
        .message {
            color: red;
            text-align: center;
        }
        .result {
            margin-top: 20px;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 5px;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>ECG Arrhythmia Classification</h1>
        <form method="post" enctype="multipart/form-data">
            <input type="file" name="files[]" multiple accept=".csv,.png,.jpg,.jpeg">
            <input type="submit" value="Upload and Classify">
        </form>
        {% if message %}
            <p class="message">{{ message }}</p>
        {% endif %}
        {% if prediction %}
            <div class="result">
                <h2>Classification Results:</h2>
                {% for result in prediction %}
                    {% if result is string %}
                        <p><strong>File:</strong> {{ result }}</p>
                    {% else %}
                        {% for key, value in result.items() %}
                            {% if value %}
                                <p><strong>{{ key }}:</strong> {{ value }}</p>
                            {% endif %}
                        {% endfor %}
                    {% endif %}
                {% endfor %}
            </div>
        {% endif %}
    </div>
</body>
</html>