File size: 4,451 Bytes
6eb82c8 |
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 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Image Segmentation</title>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Roboto', sans-serif;
background: linear-gradient(135deg, #2c3e50, #4ca1af);
color: #ffffff;
}
.navbar {
display: flex;
justify-content: space-between;
padding: 15px 20px;
background: rgba(0, 0, 0, 0.7);
align-items: center;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.navbar .logo {
font-size: 22px;
font-weight: 500;
color: #fff;
letter-spacing: 1.2px;
}
.container {
max-width: 800px;
margin: 50px auto;
text-align: center;
background: rgba(255, 255, 255, 0.1);
padding: 30px;
border-radius: 15px;
backdrop-filter: blur(10px);
}
h1 {
font-size: 36px;
margin-bottom: 20px;
color: #ffffff;
}
p {
font-size: 18px;
margin-bottom: 30px;
color: #dddddd;
}
.image-upload {
background-color: rgba(255, 255, 255, 0.2);
border: 2px dashed #b0b0b0;
padding: 80px;
border-radius: 15px;
position: relative;
margin-bottom: 30px;
transition: background-color 0.3s ease;
}
.image-upload:hover {
background-color: rgba(255, 255, 255, 0.3);
}
.image-placeholder {
display: flex;
flex-direction: column;
align-items: center;
}
.image-placeholder label {
background-color: #3a3a3a;
color: white;
font-size: 18px;
padding: 15px 35px;
border-radius: 30px;
cursor: pointer;
display: flex;
align-items: center;
transition: background-color 0.3s ease;
}
.image-placeholder label:hover {
background-color: #4a4a4a;
}
#file-input {
display: none;
}
.image-placeholder p {
margin-top: 15px;
color: #ffffff;
font-size: 16px;
}
.image-placeholder button {
margin-top: 20px;
background-color: #4ca1af;
color: white;
border: none;
padding: 12px 25px;
font-size: 16px;
border-radius: 25px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.image-placeholder button:hover {
background-color: #2980b9;
}
img {
margin-top: 20px;
border-radius: 10px;
max-width: 100%;
height: auto;
}
</style>
</head>
<body>
<nav class="navbar">
<div class="logo">Image Segmentation</div>
</nav>
<div class="container">
<h1>Upload an Image for Segmentation</h1>
<p>Unleash the Power of AI: Segment Your Images with Precision</p>
<div class="image-upload">
<div class="image-placeholder">
<form action="/predict" method="post" enctype="multipart/form-data">
<label for="file-input">
<span>Select Image</span>
</label>
<input id="file-input" type="file" name="file" accept="image/*" required />
<p>or, drag and drop an image here</p>
<button type="submit">Predict</button>
</form>
</div>
</div>
{% if uploaded_image %}
<h2>Uploaded Image</h2>
<img src="{{ url_for('static', filename='uploads/' + uploaded_image) }}" alt="Uploaded Image">
<h2>Predicted Image</h2>
<img src="{{ url_for('static', filename='uploads/' + predicted_image) }}" alt="Predicted Image">
{% endif %}
</div>
</body>
</html>
|