TrueVision / templates /index.html
HyperMehfin's picture
Upload 10 files
728527b verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/static/react/favicon.ico" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="DeepFake Detection - Advanced AI-powered video analysis" />
<link rel="manifest" href="/static/react/manifest.json" />
<title>DeepFake Detection</title>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<link href="/static/react/css/main.03d2e280.chunk.css" rel="stylesheet" />
<link href="/static/index.css" rel="stylesheet" />
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
scroll-behavior: smooth;
}
body {
margin: 0;
padding-top: 70px;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
background: #1a1a1a;
color: white;
min-height: 100vh;
}
.nav-brand {
color: #64ffda;
font-size: 1.6rem;
font-weight: bold;
text-decoration: none;
text-transform: uppercase;
letter-spacing: 1px;
transition: all 0.3s ease;
}
.nav-link {
color: white;
text-decoration: none;
padding: 0.6rem 1.2rem;
border-radius: 6px;
transition: all 0.3s ease;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.nav-link:hover {
background: #2a2a2a;
color: #64ffda;
}
.nav-link.highlight {
background: #64ffda;
color: #1a1a1a;
}
.nav-link.highlight:hover {
background: #4cd6b3;
}
.nav {
background: rgba(26, 26, 26, 0.95);
padding: 1rem 2rem;
height: 70px;
position: fixed;
width: 100%;
top: 0;
left: 0;
z-index: 1000;
backdrop-filter: blur(10px);
box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
display: flex;
align-items: center;
justify-content: space-between;
}
.nav ul {
display: flex;
gap: 1.5rem;
list-style: none;
margin: 0;
padding: 0;
}
.content {
padding: 6rem 2rem;
min-height: calc(100vh - 70px);
background: linear-gradient(135deg, #111d40 0%, #1a237e 100%);
text-align: center;
}
.heading {
font-size: 3.5rem;
color: #64ffda;
margin-bottom: 1.5rem;
text-shadow: 0 2px 10px rgba(100, 255, 218, 0.3);
animation: fadeInUp 0.8s ease-out;
}
.para {
font-size: 1.2rem;
color: #8892b0;
max-width: 800px;
margin: 0 auto 3rem;
}
.feature-card {
background: rgba(42, 42, 42, 0.8);
padding: 3rem;
border-radius: 12px;
max-width: 600px;
margin: 0 auto;
border: 1px solid rgba(100, 255, 218, 0.1);
backdrop-filter: blur(10px);
animation: fadeInUp 0.6s ease-out;
}
.button {
background: #64ffda;
color: #1a1a1a;
border: none;
padding: 1rem 2.5rem;
border-radius: 8px;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
text-transform: uppercase;
letter-spacing: 1px;
box-shadow: 0 4px 15px rgba(100, 255, 218, 0.2);
}
.button:hover {
background: #4cd6b3;
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(100, 255, 218, 0.3);
}
.file-upload {
position: relative;
width: 100%;
max-width: 400px;
text-align: center;
}
input[type="file"] {
background: rgba(42, 42, 42, 0.8);
padding: 3rem 1.5rem;
border-radius: 12px;
border: 2px dashed rgba(100, 255, 218, 0.3);
color: white;
width: 100%;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
z-index: 1;
}
input[type="file"]:hover {
border-color: #64ffda;
background: rgba(42, 42, 42, 0.9);
}
.upload-hint {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #8892b0;
font-size: 0.9rem;
pointer-events: none;
z-index: 0;
width: 100%;
transition: all 0.3s ease;
}
.file-upload:hover .upload-hint {
color: #64ffda;
}
.result-container {
background: rgba(42, 42, 42, 0.8);
padding: 2rem;
border-radius: 12px;
margin: 3rem auto;
max-width: 800px;
border: 1px solid rgba(100, 255, 218, 0.1);
animation: fadeInUp 0.6s ease-out;
}
.result-heading {
color: #64ffda;
margin-bottom: 1.5rem;
font-size: 2rem;
}
.result-text {
font-size: 1.5rem;
margin-bottom: 1rem;
}
.result-text.fake {
color: #e74c3c;
}
.result-text.real {
color: #2ecc71;
}
.confidence-text {
color: #8892b0;
font-size: 1.2rem;
}
.frames-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 2rem;
max-width: 1200px;
margin: 3rem auto;
padding: 0 1rem;
}
.frame-item {
background: rgba(42, 42, 42, 0.8);
border-radius: 8px;
overflow: hidden;
border: 1px solid rgba(100, 255, 218, 0.1);
transition: transform 0.3s ease;
}
.frame-item:hover {
transform: translateY(-5px);
}
.frame-item img {
width: 100%;
height: auto;
display: block;
}
.frame-info {
padding: 1rem;
background: rgba(26, 26, 26, 0.9);
}
.frame-number {
color: #8892b0;
margin: 0;
}
.footer {
background: #1a1a1a;
color: #8892b0;
padding: 4rem 2rem;
border-top: 1px solid rgba(42, 42, 42, 0.8);
}
.footer-content {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 3rem;
max-width: 1200px;
margin: 0 auto;
}
.footer-section h3 {
color: #64ffda;
margin-bottom: 1rem;
font-size: 1.2rem;
}
.footer-section p {
margin: 0.5rem 0;
font-size: 0.9rem;
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
</style>
<script type="text/JavaScript">
window.data = {% if data %} {{ data|safe }} {% else %} null {% endif %};
</script>
</head>
<body>
<div id="root">
<nav class="nav">
<a href="/" class="nav-brand">DeepFake Detection</a>
<ul>
<li><a href="/" class="nav-link">Home</a></li>
<li><a href="/Detect" class="nav-link highlight">Detect</a></li>
</ul>
</nav>
<main class="content">
<h1 class="heading">IS YOUR VIDEO FAKE? CHECK IT!</h1>
<p class="para">Upload your video and our advanced AI will analyze it for signs of manipulation.</p>
<form action="/Detect" method="post" enctype="multipart/form-data" class="feature-card">
<div style="display: flex; flex-direction: column; align-items: center; gap: 2rem;">
<div class="file-upload">
<input type="file" name="video" accept="video/*" required />
<p class="upload-hint">Click to select or drag a video file here</p>
</div>
<button type="submit" class="button">Analyze Video</button>
</div>
</form>
<div id="results" style="display: none;">
<div class="result-container">
<h2 class="result-heading">Analysis Result</h2>
<p id="result-text" class="result-text"></p>
<p id="confidence-text" class="confidence-text"></p>
</div>
<div class="frames-container" id="frames-grid">
<!-- Frames will be inserted here dynamically -->
</div>
</div>
</main>
<footer class="footer">
<div class="footer-content">
<div class="footer-section">
<h3>About Us</h3>
<p>We are dedicated to detecting and preventing deepfake videos using advanced AI technology.</p>
</div>
<div class="footer-section">
<h3>Contact</h3>
<p>Email: contact@deepfakedetect.ai</p>
<p>GitHub: github.com/deepfake-detect</p>
</div>
<div class="footer-section">
<h3>Legal</h3>
<p>© 2025 TrueVision</p>
<p>All Rights Reserved</p>
</div>
</div>
</footer>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const data = window.data;
if (data) {
try {
const parsedData = typeof data === 'string' ? JSON.parse(data) : data;
const resultsDiv = document.getElementById('results');
const resultText = document.getElementById('result-text');
const confidenceText = document.getElementById('confidence-text');
const framesGrid = document.getElementById('frames-grid');
resultsDiv.style.display = 'block';
// Display result and confidence
resultText.textContent = parsedData.output;
resultText.className = `result-text ${parsedData.output.toLowerCase()}`;
confidenceText.textContent = `Confidence: ${parsedData.confidence.toFixed(2)}%`;
// Display frames if available
if (parsedData.frames && parsedData.frames.length > 0) {
framesGrid.innerHTML = parsedData.frames.map((frame, index) => `
<div class="frame-item">
<img src="/static/frames/${frame}" alt="Frame ${index + 1}" />
<div class="frame-info">
<p class="frame-number">Frame ${index + 1}</p>
</div>
</div>
`).join('');
}
} catch (error) {
console.error('Error parsing data:', error);
}
}
});
</script>
</body>
</html>