VeridiaVisionAI / index.html
SaiCraze's picture
Upload index.html
57fe3c5 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Veridia Vision</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Rajdhani:wght@400;600&display=swap" rel="stylesheet">
<style>
:root {
--primary-color: #00ff88;
--secondary-color: #1a1a1a;
--accent-color: #333;
--glow-color: rgba(0, 255, 136, 0.5);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background-color: var(--secondary-color);
color: white;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
font-family: 'Rajdhani', sans-serif;
}
.logo-button {
position: fixed;
top: 20px;
left: 20px;
padding: 0.8rem 1.5rem;
background: linear-gradient(45deg, #00ff88, #00cc6a);
border: none;
border-radius: 25px;
color: var(--secondary-color);
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 0 15px var(--glow-color);
z-index: 1000;
font-family: 'Orbitron', sans-serif;
}
.logo-button:hover {
transform: translateY(-2px);
box-shadow: 0 0 25px var(--glow-color);
}
.container {
width: 100%;
max-width: 1200px;
padding: 2rem;
text-align: center;
margin-top: 2rem;
}
h1 {
font-family: 'Orbitron', sans-serif;
font-size: 2.8rem;
margin-bottom: 1rem;
color: var(--primary-color);
text-transform: uppercase;
letter-spacing: 3px;
text-shadow: 0 0 10px var(--glow-color);
}
.subtitle {
color: #888;
margin-bottom: 2rem;
font-size: 1.3rem;
letter-spacing: 1px;
}
.video-container {
position: relative;
width: 100%;
max-width: 640px;
margin: 0 auto;
border-radius: 15px;
overflow: hidden;
box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
opacity: 0;
transform: translateY(20px);
}
#video-feed {
width: 100%;
height: auto;
display: none;
}
.controls {
margin-top: 2rem;
display: flex;
justify-content: center;
gap: 1rem;
}
.btn {
font-family: 'Orbitron', sans-serif;
padding: 1rem 2.5rem;
font-size: 1.1rem;
border: none;
border-radius: 50px;
cursor: pointer;
transition: all 0.3s ease;
text-transform: uppercase;
letter-spacing: 2px;
background: linear-gradient(45deg, var(--primary-color), #00cc6a);
color: var(--secondary-color);
font-weight: bold;
box-shadow: 0 0 20px var(--glow-color);
}
.btn:hover {
transform: translateY(-2px);
box-shadow: 0 0 30px var(--glow-color);
}
.btn.stop {
background: linear-gradient(45deg, #ff3366, #ff0044);
box-shadow: 0 0 20px rgba(255, 51, 102, 0.5);
}
.status {
margin-top: 1rem;
color: var(--primary-color);
font-size: 1.2rem;
height: 1.5rem;
font-family: 'Rajdhani', sans-serif;
letter-spacing: 1px;
}
.predictions {
margin-top: 2rem;
padding: 1rem;
background: rgba(51, 51, 51, 0.7);
border-radius: 15px;
backdrop-filter: blur(10px);
max-width: 640px;
margin: 2rem auto;
}
.predictions h3 {
font-family: 'Orbitron', sans-serif;
color: var(--primary-color);
margin-bottom: 1rem;
letter-spacing: 1px;
}
.prediction-text {
font-family: 'Rajdhani', sans-serif;
font-size: 1.1rem;
letter-spacing: 0.5px;
}
.loading {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100px;
height: 100px;
border: 5px solid var(--accent-color);
border-top: 5px solid var(--primary-color);
border-radius: 50%;
animation: spin 1s linear infinite;
display: none;
}
.timer {
position: fixed;
top: 20px;
right: 20px;
padding: 0.5rem 1rem;
background: var(--accent-color);
border-radius: 25px;
font-size: 1.1rem;
color: var(--primary-color);
box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
font-family: 'Orbitron', sans-serif;
}
.warning-popup {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: var(--accent-color);
padding: 2rem;
border-radius: 15px;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
z-index: 1000;
max-width: 400px;
text-align: center;
font-family: 'Rajdhani', sans-serif;
}
.warning-popup h3 {
font-family: 'Orbitron', sans-serif;
color: var(--primary-color);
margin-bottom: 1rem;
}
.warning-popup .close-btn {
position: absolute;
top: 10px;
right: 10px;
background: none;
border: none;
color: white;
font-size: 1.5rem;
cursor: pointer;
}
.footer {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
padding: 1rem;
background: rgba(26, 26, 26, 0.9);
text-align: center;
color: #888;
backdrop-filter: blur(5px);
border-top: 1px solid var(--accent-color);
font-family: 'Rajdhani', sans-serif;
letter-spacing: 0.5px;
}
@keyframes spin {
0% { transform: translate(-50%, -50%) rotate(0deg); }
100% { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes glow {
0% { box-shadow: 0 0 20px var(--glow-color); }
50% { box-shadow: 0 0 30px var(--glow-color); }
100% { box-shadow: 0 0 20px var(--glow-color); }
}
</style>
</head>
<body>
<button class="logo-button" onclick="location.reload()">Veridia Vision v0</button>
<div class="container">
<h1>Veridia Vision</h1>
<p class="subtitle">Advanced Waste Classification System</p>
<div class="video-container">
<img id="video-feed" src="">
<div class="loading"></div>
</div>
<div class="controls">
<button id="startBtn" class="btn">Start Detection</button>
<button id="stopBtn" class="btn stop" style="display: none;">Stop</button>
</div>
<div class="status"></div>
<div class="predictions">
<h3>CURRENT PREDICTIONS</h3>
<p class="prediction-text">Waiting for detection to start...</p>
</div>
</div>
<div class="timer" style="display: none;">Time remaining: 30s</div>
<div class="warning-popup">
<button class="close-btn">&times;</button>
<h3>Time Warning</h3>
<p>To run efficiently, your connection will be cutoff in <span class="time-remaining">15</span> seconds.</p>
</div>
<footer class="footer">
Veridia Vision v0 is an experimental AI model and can make mistakes. Please double check.
</footer>
<script>
const videoFeed = document.getElementById('video-feed');
const startBtn = document.getElementById('startBtn');
const stopBtn = document.getElementById('stopBtn');
const status = document.querySelector('.status');
const loading = document.querySelector('.loading');
const videoContainer = document.querySelector('.video-container');
const timer = document.querySelector('.timer');
const warningPopup = document.querySelector('.warning-popup');
const closePopupBtn = document.querySelector('.close-btn');
const predictionText = document.querySelector('.prediction-text');
// Initialize GSAP animation
gsap.to('.video-container', {
opacity: 1,
y: 0,
duration: 1,
ease: 'power3.out'
});
let timeLeft = 30;
let timerInterval;
function updateTimer() {
timer.textContent = `Time remaining: ${timeLeft}s`;
if (timeLeft === 15) {
warningPopup.style.display = 'block';
}
if (timeLeft === 0) {
location.reload();
}
timeLeft--;
}
closePopupBtn.addEventListener('click', () => {
warningPopup.style.display = 'none';
});
startBtn.addEventListener('click', () => {
videoFeed.style.display = 'block';
loading.style.display = 'block';
videoFeed.src = '/video_feed';
startBtn.style.display = 'none';
stopBtn.style.display = 'inline-block';
status.textContent = 'Detection active';
timer.style.display = 'block';
predictionText.textContent = 'Processing...';
// Start the timer
timeLeft = 30;
timerInterval = setInterval(updateTimer, 1000);
// Animate the video container
gsap.from(videoFeed, {
scale: 0.9,
opacity: 0,
duration: 0.5,
ease: 'power2.out'
});
});
stopBtn.addEventListener('click', async () => {
const response = await fetch('/stop');
videoFeed.style.display = 'none';
loading.style.display = 'none';
startBtn.style.display = 'inline-block';
stopBtn.style.display = 'none';
status.textContent = 'Detection stopped';
videoFeed.src = '';
timer.style.display = 'none';
predictionText.textContent = 'Waiting for detection to start...';
clearInterval(timerInterval);
});
videoFeed.addEventListener('load', () => {
loading.style.display = 'none';
});
</script>
</body>
</html>