Spaces:
Running
Running
File size: 5,339 Bytes
829f2ca | 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 | <!-- <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CHATGS + Exhibition Robot</title>
<link rel="icon" href="🚀" type="image/icon type">
<link rel="stylesheet" type="text/css" href="/static/styles.css">
</head>
<body>
<div class="top-nav">
<h3 style="font-size: 40px;margin:auto;">Face Recognition</h3>
</div>
<nav class="nav">
<img class="nav-img" src="{{ url_for('static', filename='assets/NRSC.png') }}" alt="NRSC-ISRO logo">
<ul>
<li class="active"><a href="/" style="padding: 12px;">Home</a></li>
<br>
<li class="about"><a href="/about">About</a></li>
<br>
<li class="info"><a href="/info">Reservoirs Info</a></li>
<br>
<li class="qr"><a href="/qr">QR Scanner</a></li>
<br>
<li class="command"><a href="/command">Face Recognition</a></li>
<br>
<li class="tutorial"><a href="/voiceassistant">Voice Assistant</a></li>
</ul>
</nav>
<div class="center-container">
<!-- <div class="video-container">
<video autoplay muted loop id="background-video">
<source src="{{ url_for('static', filename='assets/video.mp4') }}" type="video/mp4">
Your browser does not support the video tag.
</video>
</div> -->
<!--
<img id="video_feed" src="{{ url_for('video_feed') }}" width="800" height="600">
<h2 id="recognized-name"></h2>
<img id="recognized" alt="Recognizing..." width="640" height="480">
<div class="conclusion-container">
<p id="response"></p>
</div>
<audio id="conversation" style="display: none;" autoplay controls></audio>
</div>
<script src="/static/command.js"></script>
<script>
document.getElementById('stop-video').addEventListener('click', async () => {
await fetch('/stop_video_feed', { method: 'GET' });
alert('Video feed stopped');
});
</script>
</body>
</html> --> -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CHATGS</title>
<link rel="icon" href="🚀" type="image/icon type">
<link rel="stylesheet" type="text/css" href="/static/styles.css">
</head>
<body>
<div class="top-nav">
<h3 style="font-size: 40px;margin:auto;">Face Recognition</h3>
</div>
<nav class="nav">
<img class="nav-img" src="{{ url_for('static', filename='assets/NRSC.png') }}" alt="NRSC-ISRO logo">
<ul>
<li class="active" id="stop-video"><a href="/" style="padding: 12px;">Home</a></li>
<br>
<li class="about" id="stop-video"><a href="/about">About</a></li>
<br>
<li class="info" id="stop-video"><a href="/info">Reservoirs Info</a></li>
<br>
<li class="qr" id="stop-video"><a href="/qr">QR Scanner</a></li>
<br>
<li class="command" id="stop-video"><a href="/command">Face Recognition</a></li>
<br>
<li class="tutorial" id="stop-video"><a href="/voiceassistant">Voice Assistant</a></li><br>
<li class="climatemap" id="stop-video"><a href="/climatemap">Climate Map</a></li>
</ul>
</nav>
<div class="center-container">
<!-- <div class="video-container">
<video autoplay muted loop id="background-video">
<source src="{{ url_for('static', filename='assets/video.mp4') }}" type="video/mp4">
Your browser does not support the video tag.
</video>
</div> -->
<img id="video_feed" src="{{ url_for('video_feed') }}" width="800" height="600">
<h2 id="recognized-name"></h2>
<img id="recognized" alt="Recognizing..." width="640" height="480">
<div class="conclusion-container">
<p id="response"></p>
</div>
<audio id="conversation" autoplay controls></audio>
</div>
<script src="/static/command.js"></script>
<script>
// Select all the links inside the nav
const navLinks = document.querySelectorAll('.nav a');
// Add click event listener to each link
navLinks.forEach(link => {
link.addEventListener('click', async (event) => {
// Prevent the default link action
event.preventDefault();
// Send a request to stop the video feed
await fetch('/stop_video_feed', { method: 'GET' });
// After stopping the video feed, navigate to the clicked link's destination
window.location.href = event.target.href;
});
});
</script>
</body>
</html> |