ConiferousYogi's picture
Upload 2 files
b0528ea verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>AI Aadhaar Fraud Detection - Upload</title>
<script src="https://cdn.tailwindcss.com"></script>
<link
rel="stylesheet"
href="{{ url_for('static', filename='css/styles.css') }}"
/>
</head>
<body
class="min-h-screen bg-gradient-to-br from-slate-50 via-blue-50/30 to-slate-50"
>
<!-- Header -->
<header class="border-b bg-white/80 backdrop-blur-sm sticky top-0 z-10">
<div class="container mx-auto px-6 py-4">
<div class="flex items-center gap-3">
<div class="p-2 bg-blue-600 rounded-lg">
<svg
class="h-6 w-6 text-white"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"
/>
</svg>
</div>
<div>
<h1 class="text-xl text-slate-900">
AI-Powered Fraud Detection for Aadhar
</h1>
<p class="text-sm text-slate-500">
Intelligent Document Verification System
</p>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<main class="container mx-auto px-6 py-12">
<div class="max-w-5xl mx-auto">
<!-- Hero Section -->
<div class="text-center mb-12">
<div
class="inline-flex items-center gap-2 bg-blue-100 text-blue-700 px-4 py-2 rounded-full mb-4"
>
<svg
class="h-4 w-4"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"
/>
</svg>
<span class="text-sm">Fast & Trustworthy</span>
</div>
<h2 class="text-3xl text-slate-900 mb-3">
Upload Aadhaar Card for Analysis
</h2>
<p class="text-lg text-slate-600 max-w-2xl mx-auto">
Our AI-powered system analyzes document authenticity, detects
tampering, and verifies data integrity using advanced machine
learning algorithms.
</p>
</div>
<!-- Upload Form -->
<form
id="upload-form"
action="/upload"
method="POST"
enctype="multipart/form-data"
>
<!-- Upload Cards -->
<div class="grid md:grid-cols-2 gap-6 mb-8">
<!-- Front Card Upload -->
<div class="bg-white rounded-lg shadow-lg border border-slate-200">
<div class="p-6 border-b border-slate-200">
<h3 class="flex items-center gap-2 text-slate-900 mb-1">
<svg
class="h-5 w-5 text-blue-600"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"
/>
</svg>
Front Side
</h3>
<p class="text-sm text-slate-500">
Upload the front side of the Aadhaar card
</p>
</div>
<div class="p-6">
<div
id="front-drop-zone"
class="border-2 border-dashed border-slate-300 bg-slate-50 rounded-lg p-8 text-center transition-all hover:border-blue-400 hover:bg-blue-50/50 cursor-pointer"
>
<div id="front-upload-content">
<svg
class="h-12 w-12 text-slate-400 mx-auto mb-3"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"
/>
</svg>
<p class="text-sm text-slate-700 mb-1">
Drag & drop or click to upload
</p>
<p class="text-xs text-slate-500 mb-3">
PNG, JPG up to 10MB
</p>
<button
type="button"
class="inline-flex items-center px-4 py-2 border border-slate-300 rounded-lg text-sm bg-white hover:bg-slate-50 transition-colors"
onclick="event.stopPropagation(); document.getElementById('front-upload').click()"
>
Browse Files
</button>
</div>
<div id="front-file-info" class="hidden">
<svg
class="h-12 w-12 text-green-600 mx-auto mb-3"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
<p
class="text-sm text-slate-700 mb-1"
id="front-file-name"
></p>
<p
class="text-xs text-slate-500 mb-3"
id="front-file-size"
></p>
<button
type="button"
class="inline-flex items-center px-4 py-2 border border-slate-300 rounded-lg text-sm bg-white hover:bg-slate-50 transition-colors"
onclick="removeFrontFile(event)"
>
Remove
</button>
</div>
<input
type="file"
id="front-upload"
name="front_image"
class="hidden"
accept="image/*"
/>
</div>
</div>
</div>
<!-- Back Card Upload -->
<div class="bg-white rounded-lg shadow-lg border border-slate-200">
<div class="p-6 border-b border-slate-200">
<h3 class="flex items-center gap-2 text-slate-900 mb-1">
<svg
class="h-5 w-5 text-blue-600"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"
/>
</svg>
Back Side
</h3>
<p class="text-sm text-slate-500">
Upload the back side of the Aadhaar card
</p>
</div>
<div class="p-6">
<div
id="back-drop-zone"
class="border-2 border-dashed border-slate-300 bg-slate-50 rounded-lg p-8 text-center transition-all hover:border-blue-400 hover:bg-blue-50/50 cursor-pointer"
>
<div id="back-upload-content">
<svg
class="h-12 w-12 text-slate-400 mx-auto mb-3"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"
/>
</svg>
<p class="text-sm text-slate-700 mb-1">
Drag & drop or click to upload
</p>
<p class="text-xs text-slate-500 mb-3">
PNG, JPG up to 10MB
</p>
<button
type="button"
class="inline-flex items-center px-4 py-2 border border-slate-300 rounded-lg text-sm bg-white hover:bg-slate-50 transition-colors"
onclick="event.stopPropagation();document.getElementById('back-upload').click()"
>
Browse Files
</button>
</div>
<div id="back-file-info" class="hidden">
<svg
class="h-12 w-12 text-green-600 mx-auto mb-3"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
<p
class="text-sm text-slate-700 mb-1"
id="back-file-name"
></p>
<p
class="text-xs text-slate-500 mb-3"
id="back-file-size"
></p>
<button
type="button"
class="inline-flex items-center px-4 py-2 border border-slate-300 rounded-lg text-sm bg-white hover:bg-slate-50 transition-colors"
onclick="removeBackFile(event)"
>
Remove
</button>
</div>
<input
type="file"
id="back-upload"
name="back_image"
class="hidden"
accept="image/*"
/>
</div>
</div>
</div>
</div>
<!-- Information Alert -->
<div class="mb-6 border border-blue-200 bg-blue-50 rounded-lg p-4">
<div class="flex gap-3">
<svg
class="h-4 w-4 text-blue-600 mt-0.5 flex-shrink-0"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
<p class="text-slate-700 text-sm">
All uploaded documents are processed securely. The analysis
typically takes 5-10 seconds.
</p>
</div>
</div>
<!--Check status-->
<div id="upload-status" class="text-center text-sm mt-4"></div>
<br />
<!-- Analyze Button -->
<div class="flex justify-center">
<button
type="submit"
id="analyze-btn"
class="inline-flex items-center px-8 py-3 bg-blue-600 hover:bg-blue-700 text-white rounded-lg shadow-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
disabled
>
<svg
class="h-5 w-5 mr-2"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"
/>
</svg>
Analyze Document
</button>
</div>
</form>
<!-- Features Grid -->
<div class="grid md:grid-cols-3 gap-6 mt-16">
<div class="text-center p-6">
<div
class="inline-flex items-center justify-center w-12 h-12 bg-blue-100 rounded-lg mb-4"
>
<svg
class="h-6 w-6 text-blue-600"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"
/>
</svg>
</div>
<h3 class="text-slate-900 mb-2">AI-Powered Detection</h3>
<p class="text-sm text-slate-600">
Advanced machine learning algorithms detect subtle forgeries and
alterations
</p>
</div>
<div class="text-center p-6">
<div
class="inline-flex items-center justify-center w-12 h-12 bg-green-100 rounded-lg mb-4"
>
<svg
class="h-6 w-6 text-green-600"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
</div>
<h3 class="text-slate-900 mb-2">Multi-Layer Verification</h3>
<p class="text-sm text-slate-600">
OCR, QR code, metadata, and visual integrity checks for
comprehensive analysis
</p>
</div>
<div class="text-center p-6">
<div
class="inline-flex items-center justify-center w-12 h-12 bg-purple-100 rounded-lg mb-4"
>
<svg
class="h-6 w-6 text-purple-600"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
</div>
<h3 class="text-slate-900 mb-2">Instant Reports</h3>
<p class="text-sm text-slate-600">
Get detailed fraud analysis reports with annotated findings in
seconds
</p>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer class="border-t bg-white mt-16">
<div class="container mx-auto px-6 py-6">
<p class="text-center text-sm text-slate-500">
© 2025 AI Aadhaar Fraud Detection System. For authorized use only.
</p>
</div>
</footer>
<script src="{{ url_for('static', filename='js/upload.js') }}"></script>
</body>
</html>