ecg-image-analysis / index.html
Nayefleb's picture
Create index.html
3365d41 verified
<!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>