Spaces:
No application file
No application file
Upload index.html
Browse files- templates/index.html +66 -0
templates/index.html
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Real-Time Anomaly Detection</title>
|
| 7 |
+
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
| 8 |
+
</head>
|
| 9 |
+
<body>
|
| 10 |
+
<div class="container">
|
| 11 |
+
<main class="main-content">
|
| 12 |
+
<div class="header">
|
| 13 |
+
<h1>Anomaly Detection Dashboard</h1>
|
| 14 |
+
<button id="resetButton">Reset</button>
|
| 15 |
+
</div>
|
| 16 |
+
|
| 17 |
+
<div class="dashboard-grid">
|
| 18 |
+
|
| 19 |
+
<div class="video-area">
|
| 20 |
+
<div class="video-wrapper">
|
| 21 |
+
<video id="videoPlayer" width="100%" controls muted>
|
| 22 |
+
Your browser does not support the video tag.
|
| 23 |
+
</video>
|
| 24 |
+
</div>
|
| 25 |
+
<p id="statusLabel">Select a video to begin.</p>
|
| 26 |
+
</div>
|
| 27 |
+
|
| 28 |
+
<div class="chart-container">
|
| 29 |
+
<h3>Live Anomaly Score</h3>
|
| 30 |
+
<canvas id="anomalyChart"></canvas>
|
| 31 |
+
</div>
|
| 32 |
+
|
| 33 |
+
</div>
|
| 34 |
+
</main>
|
| 35 |
+
|
| 36 |
+
<aside class="sidebar">
|
| 37 |
+
<h2>Demo Videos</h2>
|
| 38 |
+
<select id="anomalySelector" class="custom-select">
|
| 39 |
+
<option value="" disabled selected>Select a Demo Video...</option>
|
| 40 |
+
{% for name in anomaly_names %}
|
| 41 |
+
<option value="{{ name }}">{{ name }}</option>
|
| 42 |
+
{% endfor %}
|
| 43 |
+
</select>
|
| 44 |
+
|
| 45 |
+
<hr class="separator">
|
| 46 |
+
<h2>Upload Your Own</h2>
|
| 47 |
+
<div class="upload-section">
|
| 48 |
+
<input type="file" id="videoUpload" accept="video/mp4, video/mov, video/avi">
|
| 49 |
+
<button id="uploadButton">Analyze Uploaded Video</button>
|
| 50 |
+
</div>
|
| 51 |
+
|
| 52 |
+
<hr class="separator">
|
| 53 |
+
|
| 54 |
+
<div class="yolo-container">
|
| 55 |
+
<h3>YOLO Detection Result</h3>
|
| 56 |
+
<p id="yoloTextLabel">Waiting for anomaly...</p>
|
| 57 |
+
<img id="yoloImageFrame" src="" alt="YOLO Frame Preview">
|
| 58 |
+
</div>
|
| 59 |
+
</aside>
|
| 60 |
+
</div>
|
| 61 |
+
|
| 62 |
+
<script src="https://cdn.socket.io/4.7.5/socket.io.min.js"></script>
|
| 63 |
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
| 64 |
+
<script src="{{ url_for('static', filename='js/main.js') }}"></script>
|
| 65 |
+
</body>
|
| 66 |
+
</html>
|