-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
68 lines (64 loc) · 2.08 KB
/
index.html
File metadata and controls
68 lines (64 loc) · 2.08 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Construction Site Safety Detection</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
background-color: #f4f4f4;
}
.container {
margin-top: 50px;
text-align: center;
}
.card {
padding: 20px;
border-radius: 15px;
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
background-color: #ffffff;
}
.btn-upload {
background-color: #007bff;
color: white;
font-size: 18px;
padding: 10px 20px;
border-radius: 8px;
}
.btn-upload:hover {
background-color: #0056b3;
}
.image-preview {
max-width: 100%;
height: auto;
border-radius: 10px;
margin-top: 10px;
}
</style>
</head>
<body>
<div class="container">
<h1 class="mb-4">🦺 PPE Detection System</h1>
<div class="card p-4">
<form action="/" method="post" enctype="multipart/form-data">
<input type="file" name="file" class="form-control mb-3" required>
<button type="submit" class="btn btn-upload">Upload & Detect</button>
</form>
</div>
{% if uploaded_file %}
<div class="row mt-4">
<div class="col-md-6">
<h4>📸 Uploaded Image:</h4>
<img src="{{ url_for('static', filename='uploads/' + uploaded_file) }}" class="image-preview">
</div>
<div class="col-md-6">
<h4>🔍 Detected Results:</h4>
<img src="{{ url_for('static', filename='output/' + output_file) }}" class="image-preview">
</div>
</div>
{% endif %}
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>