|
|
<!DOCTYPE html>
|
|
|
<html lang="en">
|
|
|
<head>
|
|
|
<meta charset="UTF-8">
|
|
|
<title>Phân loại Chó - Mèo</title>
|
|
|
|
|
|
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap" rel="stylesheet">
|
|
|
<style>
|
|
|
body {
|
|
|
background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
|
|
|
font-family: 'Roboto', sans-serif;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
color: #333;
|
|
|
}
|
|
|
.container {
|
|
|
max-width: 800px;
|
|
|
margin: 50px auto;
|
|
|
background: rgba(255, 255, 255, 0.95);
|
|
|
padding: 30px;
|
|
|
border-radius: 10px;
|
|
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
|
text-align: center;
|
|
|
}
|
|
|
h1 {
|
|
|
color: #444;
|
|
|
font-size: 2.5em;
|
|
|
margin-bottom: 20px;
|
|
|
}
|
|
|
form {
|
|
|
margin: 20px auto;
|
|
|
}
|
|
|
input[type="file"] {
|
|
|
display: block;
|
|
|
margin: 10px auto;
|
|
|
}
|
|
|
input[type="submit"] {
|
|
|
background: #ff6f61;
|
|
|
color: #fff;
|
|
|
border: none;
|
|
|
padding: 10px 20px;
|
|
|
border-radius: 5px;
|
|
|
font-size: 1em;
|
|
|
cursor: pointer;
|
|
|
transition: background 0.3s ease;
|
|
|
}
|
|
|
input[type="submit"]:hover {
|
|
|
background: #e65c50;
|
|
|
}
|
|
|
img {
|
|
|
max-width: 300px;
|
|
|
margin: 20px;
|
|
|
border: 3px solid #ff6f61;
|
|
|
border-radius: 8px;
|
|
|
}
|
|
|
h3 {
|
|
|
color: #555;
|
|
|
}
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
|
<div class="container">
|
|
|
<h1>Phân loại Chó - Mèo</h1>
|
|
|
<form method="POST" enctype="multipart/form-data">
|
|
|
<input type="file" name="file" accept="image/*">
|
|
|
<input type="submit" value="Tải lên và Dự đoán">
|
|
|
</form>
|
|
|
|
|
|
{% if image_path %}
|
|
|
<h3>Ảnh tải lên:</h3>
|
|
|
<img src="{{ url_for('static', filename=image_path) }}" alt="Uploaded Image">
|
|
|
{% endif %}
|
|
|
|
|
|
{% if result %}
|
|
|
<h3>Kết quả: {{ result }}</h3>
|
|
|
{% endif %}
|
|
|
</div>
|
|
|
</body>
|
|
|
</html>
|
|
|
|