Spaces:
Running
Running
Commit ·
ccb7e46
0
Parent(s):
Initial deployment - Face verification demo
Browse files- React frontend with Vite and TailwindCSS
- FastAPI backend as secure API proxy
- Docker configuration for HuggingFace Spaces
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- .gitattributes +35 -0
- .gitignore +21 -0
- Dockerfile +62 -0
- README.md +89 -0
- assets/logo.png +0 -0
- backend/main.py +174 -0
- backend/requirements.txt +5 -0
- frontend/index.html +16 -0
- frontend/package-lock.json +0 -0
- frontend/package.json +25 -0
- frontend/postcss.config.js +6 -0
- frontend/public/favicon.svg +14 -0
- frontend/public/logo.png +0 -0
- frontend/public/seventhsense-logo.png +0 -0
- frontend/src/App.jsx +198 -0
- frontend/src/components/Features.jsx +320 -0
- frontend/src/components/Header.jsx +105 -0
- frontend/src/components/ImageUpload.jsx +133 -0
- frontend/src/components/ResultDisplay.jsx +151 -0
- frontend/src/main.jsx +10 -0
- frontend/src/styles/index.css +192 -0
- frontend/tailwind.config.js +62 -0
- frontend/vite.config.js +15 -0
- static/assets/index-DkDtm-x5.js +0 -0
- static/assets/index-IQR6BTDK.css +1 -0
- static/favicon.svg +14 -0
- static/index.html +17 -0
- static/logo.png +0 -0
- static/seventhsense-logo.png +0 -0
.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Dependencies
|
| 2 |
+
node_modules/
|
| 3 |
+
__pycache__/
|
| 4 |
+
*.pyc
|
| 5 |
+
|
| 6 |
+
# Build cache
|
| 7 |
+
.vite/
|
| 8 |
+
*.log
|
| 9 |
+
|
| 10 |
+
# Environment
|
| 11 |
+
.env
|
| 12 |
+
.env.local
|
| 13 |
+
|
| 14 |
+
# IDE
|
| 15 |
+
.idea/
|
| 16 |
+
.vscode/
|
| 17 |
+
*.swp
|
| 18 |
+
|
| 19 |
+
# OS
|
| 20 |
+
.DS_Store
|
| 21 |
+
Thumbs.db
|
Dockerfile
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Seventh Sense AI - Face Recognition Space
|
| 2 |
+
# Multi-stage build for React + FastAPI
|
| 3 |
+
|
| 4 |
+
# Stage 1: Build React frontend
|
| 5 |
+
FROM node:20-alpine AS frontend-builder
|
| 6 |
+
|
| 7 |
+
WORKDIR /app/frontend
|
| 8 |
+
|
| 9 |
+
# Copy package files
|
| 10 |
+
COPY frontend/package*.json ./
|
| 11 |
+
|
| 12 |
+
# Install dependencies
|
| 13 |
+
RUN npm install
|
| 14 |
+
|
| 15 |
+
# Copy source code
|
| 16 |
+
COPY frontend/ ./
|
| 17 |
+
|
| 18 |
+
# Build the React app
|
| 19 |
+
RUN npm run build
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
# Stage 2: Production image with FastAPI
|
| 23 |
+
FROM python:3.11-slim
|
| 24 |
+
|
| 25 |
+
WORKDIR /app
|
| 26 |
+
|
| 27 |
+
# Install system dependencies
|
| 28 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 29 |
+
curl \
|
| 30 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 31 |
+
|
| 32 |
+
# Copy backend requirements and install
|
| 33 |
+
COPY backend/requirements.txt ./
|
| 34 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 35 |
+
|
| 36 |
+
# Copy backend code
|
| 37 |
+
COPY backend/ ./backend/
|
| 38 |
+
|
| 39 |
+
# Copy built frontend from stage 1
|
| 40 |
+
COPY --from=frontend-builder /app/static ./static
|
| 41 |
+
|
| 42 |
+
# Create non-root user for security
|
| 43 |
+
RUN useradd -m -u 1000 user
|
| 44 |
+
USER user
|
| 45 |
+
|
| 46 |
+
# Set environment variables
|
| 47 |
+
ENV HOME=/home/user \
|
| 48 |
+
PATH=/home/user/.local/bin:$PATH \
|
| 49 |
+
PYTHONUNBUFFERED=1 \
|
| 50 |
+
PYTHONDONTWRITEBYTECODE=1
|
| 51 |
+
|
| 52 |
+
WORKDIR /app
|
| 53 |
+
|
| 54 |
+
# Expose port (HuggingFace Spaces uses 7860)
|
| 55 |
+
EXPOSE 7860
|
| 56 |
+
|
| 57 |
+
# Health check
|
| 58 |
+
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
| 59 |
+
CMD curl -f http://localhost:7860/api/health || exit 1
|
| 60 |
+
|
| 61 |
+
# Run the FastAPI server
|
| 62 |
+
CMD ["python", "-m", "uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Face Recognition
|
| 3 |
+
emoji: 🔍
|
| 4 |
+
colorFrom: indigo
|
| 5 |
+
colorTo: purple
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
license: mit
|
| 9 |
+
app_port: 7860
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Seventh Sense AI - Face Recognition
|
| 13 |
+
|
| 14 |
+
Advanced AI-powered face comparison technology. Upload two images to verify if they belong to the same person.
|
| 15 |
+
|
| 16 |
+
## Features
|
| 17 |
+
|
| 18 |
+
- **Enterprise Security** - Bank-grade encryption and secure API endpoints
|
| 19 |
+
- **Lightning Fast** - Process face comparisons in milliseconds
|
| 20 |
+
- **Privacy First** - Images are processed securely and never stored
|
| 21 |
+
- **99.7% Accuracy** - Industry-leading accuracy rates
|
| 22 |
+
|
| 23 |
+
## Usage
|
| 24 |
+
|
| 25 |
+
1. Upload two face images
|
| 26 |
+
2. Click "Compare Faces"
|
| 27 |
+
3. View the similarity score and match result
|
| 28 |
+
|
| 29 |
+
## API
|
| 30 |
+
|
| 31 |
+
This Space also provides a REST API for programmatic access:
|
| 32 |
+
|
| 33 |
+
```bash
|
| 34 |
+
curl -X POST "https://seventhsenseai-face-recognition.hf.space/api/compare" \
|
| 35 |
+
-F "image1=@face1.jpg" \
|
| 36 |
+
-F "image2=@face2.jpg"
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
## Configuration
|
| 40 |
+
|
| 41 |
+
### Environment Variables (Secrets)
|
| 42 |
+
|
| 43 |
+
Set these in your Space settings under **Settings → Repository Secrets**:
|
| 44 |
+
|
| 45 |
+
| Variable | Description |
|
| 46 |
+
|----------|-------------|
|
| 47 |
+
| `SEVENTHSENSE_API_KEY` | Your Seventh Sense AI API key |
|
| 48 |
+
| `SEVENTHSENSE_API_URL` | API endpoint URL (optional) |
|
| 49 |
+
|
| 50 |
+
**Important:** The API key is stored securely and never exposed to the client-side code.
|
| 51 |
+
|
| 52 |
+
## Development
|
| 53 |
+
|
| 54 |
+
### Local Setup
|
| 55 |
+
|
| 56 |
+
```bash
|
| 57 |
+
# Install frontend dependencies
|
| 58 |
+
cd frontend && npm install
|
| 59 |
+
|
| 60 |
+
# Install backend dependencies
|
| 61 |
+
pip install -r backend/requirements.txt
|
| 62 |
+
|
| 63 |
+
# Run frontend dev server
|
| 64 |
+
npm run dev
|
| 65 |
+
|
| 66 |
+
# Run backend (in another terminal)
|
| 67 |
+
python -m uvicorn backend.main:app --reload --port 7860
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
### Build for Production
|
| 71 |
+
|
| 72 |
+
```bash
|
| 73 |
+
# Build frontend
|
| 74 |
+
cd frontend && npm run build
|
| 75 |
+
|
| 76 |
+
# Run with Docker
|
| 77 |
+
docker build -t seventh-sense-face-recognition .
|
| 78 |
+
docker run -p 7860:7860 -e SEVENTHSENSE_API_KEY=your_key seventh-sense-face-recognition
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
## Tech Stack
|
| 82 |
+
|
| 83 |
+
- **Frontend:** React 18, Vite, TailwindCSS, Framer Motion
|
| 84 |
+
- **Backend:** FastAPI, Python 3.11
|
| 85 |
+
- **Deployment:** Docker, HuggingFace Spaces
|
| 86 |
+
|
| 87 |
+
---
|
| 88 |
+
|
| 89 |
+
Built with ❤️ by [Seventh Sense AI](https://huggingface.co/SeventhSenseAI)
|
assets/logo.png
ADDED
|
backend/main.py
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Seventh Sense AI - Face Recognition API Backend
|
| 3 |
+
This FastAPI server acts as a secure proxy to the cloud Face Recognition API.
|
| 4 |
+
The API key is stored securely in HuggingFace Spaces secrets.
|
| 5 |
+
"""
|
| 6 |
+
|
| 7 |
+
import os
|
| 8 |
+
import httpx
|
| 9 |
+
import time
|
| 10 |
+
import base64
|
| 11 |
+
from fastapi import FastAPI, File, UploadFile, HTTPException
|
| 12 |
+
from fastapi.staticfiles import StaticFiles
|
| 13 |
+
from fastapi.responses import FileResponse
|
| 14 |
+
from fastapi.middleware.cors import CORSMiddleware
|
| 15 |
+
from pydantic import BaseModel
|
| 16 |
+
from typing import Optional
|
| 17 |
+
|
| 18 |
+
app = FastAPI(
|
| 19 |
+
title="Seventh Sense AI - Face Recognition",
|
| 20 |
+
description="Advanced AI-powered face comparison technology",
|
| 21 |
+
version="1.0.0"
|
| 22 |
+
)
|
| 23 |
+
|
| 24 |
+
# CORS middleware for development
|
| 25 |
+
app.add_middleware(
|
| 26 |
+
CORSMiddleware,
|
| 27 |
+
allow_origins=["*"],
|
| 28 |
+
allow_credentials=True,
|
| 29 |
+
allow_methods=["*"],
|
| 30 |
+
allow_headers=["*"],
|
| 31 |
+
)
|
| 32 |
+
|
| 33 |
+
# Get API key from environment (HuggingFace Spaces secret)
|
| 34 |
+
# Set this in your Space settings: Settings -> Repository Secrets
|
| 35 |
+
SEVENTHSENSE_API_KEY = os.environ.get("SEVENTHSENSE_API_KEY", "")
|
| 36 |
+
SEVENTHSENSE_API_URL = os.environ.get("SEVENTHSENSE_API_URL", "")
|
| 37 |
+
|
| 38 |
+
# Match threshold - scores above this are considered a match
|
| 39 |
+
MATCH_THRESHOLD = 0.67
|
| 40 |
+
|
| 41 |
+
# Response models
|
| 42 |
+
class CompareResponse(BaseModel):
|
| 43 |
+
match: bool
|
| 44 |
+
similarity: float
|
| 45 |
+
face1_bbox: Optional[dict] = None
|
| 46 |
+
face2_bbox: Optional[dict] = None
|
| 47 |
+
processing_time: Optional[int] = None
|
| 48 |
+
message: Optional[str] = None
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
@app.get("/api/health")
|
| 52 |
+
async def health_check():
|
| 53 |
+
"""Health check endpoint"""
|
| 54 |
+
return {
|
| 55 |
+
"status": "healthy",
|
| 56 |
+
"api_configured": bool(SEVENTHSENSE_API_KEY),
|
| 57 |
+
"version": "1.0.0"
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
@app.post("/api/compare", response_model=CompareResponse)
|
| 62 |
+
async def compare_faces(
|
| 63 |
+
image1: UploadFile = File(..., description="First face image (probe)"),
|
| 64 |
+
image2: UploadFile = File(..., description="Second face image (gallery)")
|
| 65 |
+
):
|
| 66 |
+
"""
|
| 67 |
+
Compare two face images and determine if they belong to the same person.
|
| 68 |
+
|
| 69 |
+
The API key is securely stored in HuggingFace Spaces secrets and never exposed to the client.
|
| 70 |
+
Uses your cloud API endpoint with base64 encoded images.
|
| 71 |
+
"""
|
| 72 |
+
start_time = time.time()
|
| 73 |
+
|
| 74 |
+
# Validate file types
|
| 75 |
+
allowed_types = ["image/jpeg", "image/jpg", "image/png", "image/webp"]
|
| 76 |
+
|
| 77 |
+
if image1.content_type not in allowed_types:
|
| 78 |
+
raise HTTPException(status_code=400, detail=f"Invalid file type for image1: {image1.content_type}")
|
| 79 |
+
|
| 80 |
+
if image2.content_type not in allowed_types:
|
| 81 |
+
raise HTTPException(status_code=400, detail=f"Invalid file type for image2: {image2.content_type}")
|
| 82 |
+
|
| 83 |
+
# Read image data
|
| 84 |
+
image1_data = await image1.read()
|
| 85 |
+
image2_data = await image2.read()
|
| 86 |
+
|
| 87 |
+
# Size validation (max 10MB each)
|
| 88 |
+
max_size = 10 * 1024 * 1024
|
| 89 |
+
if len(image1_data) > max_size or len(image2_data) > max_size:
|
| 90 |
+
raise HTTPException(status_code=400, detail="Image size exceeds 10MB limit")
|
| 91 |
+
|
| 92 |
+
# Check if API is configured
|
| 93 |
+
if not SEVENTHSENSE_API_KEY or not SEVENTHSENSE_API_URL:
|
| 94 |
+
# Demo mode - return mock response for testing UI
|
| 95 |
+
# Remove this in production and require API key
|
| 96 |
+
processing_time = int((time.time() - start_time) * 1000)
|
| 97 |
+
return CompareResponse(
|
| 98 |
+
match=True,
|
| 99 |
+
similarity=0.87,
|
| 100 |
+
face1_bbox={"x": 100, "y": 80, "width": 150, "height": 180},
|
| 101 |
+
face2_bbox={"x": 110, "y": 90, "width": 140, "height": 170},
|
| 102 |
+
processing_time=processing_time,
|
| 103 |
+
message="Demo mode - Configure SEVENTHSENSE_API_KEY and SEVENTHSENSE_API_URL for production"
|
| 104 |
+
)
|
| 105 |
+
|
| 106 |
+
# Convert images to base64
|
| 107 |
+
probe_b64 = base64.b64encode(image1_data).decode("utf-8")
|
| 108 |
+
gallery_b64 = base64.b64encode(image2_data).decode("utf-8")
|
| 109 |
+
|
| 110 |
+
# Call the Seventh Sense AI API
|
| 111 |
+
try:
|
| 112 |
+
async with httpx.AsyncClient(timeout=30.0) as client:
|
| 113 |
+
# Prepare the request payload matching your API format
|
| 114 |
+
payload = {
|
| 115 |
+
"probe": [probe_b64],
|
| 116 |
+
"gallery": [gallery_b64],
|
| 117 |
+
"search_mode": "FAST"
|
| 118 |
+
}
|
| 119 |
+
headers = {
|
| 120 |
+
"x-api-key": SEVENTHSENSE_API_KEY,
|
| 121 |
+
"Content-Type": "application/json"
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
response = await client.post(
|
| 125 |
+
f"{SEVENTHSENSE_API_URL}/compare",
|
| 126 |
+
json=payload,
|
| 127 |
+
headers=headers
|
| 128 |
+
)
|
| 129 |
+
|
| 130 |
+
if response.status_code != 200:
|
| 131 |
+
raise HTTPException(
|
| 132 |
+
status_code=response.status_code,
|
| 133 |
+
detail=f"API error: {response.text}"
|
| 134 |
+
)
|
| 135 |
+
|
| 136 |
+
result = response.json()
|
| 137 |
+
processing_time = int((time.time() - start_time) * 1000)
|
| 138 |
+
|
| 139 |
+
# Get score from response
|
| 140 |
+
score = result.get("score", 0.0)
|
| 141 |
+
is_match = score >= MATCH_THRESHOLD
|
| 142 |
+
|
| 143 |
+
return CompareResponse(
|
| 144 |
+
match=is_match,
|
| 145 |
+
similarity=score,
|
| 146 |
+
face1_bbox=result.get("face1_bbox"),
|
| 147 |
+
face2_bbox=result.get("face2_bbox"),
|
| 148 |
+
processing_time=processing_time
|
| 149 |
+
)
|
| 150 |
+
|
| 151 |
+
except httpx.TimeoutException:
|
| 152 |
+
raise HTTPException(status_code=504, detail="API request timed out")
|
| 153 |
+
except httpx.RequestError as e:
|
| 154 |
+
raise HTTPException(status_code=502, detail=f"Failed to connect to API: {str(e)}")
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
# Serve static files (React build)
|
| 158 |
+
# In production, the React build output goes to /static
|
| 159 |
+
static_dir = os.path.join(os.path.dirname(__file__), "..", "static")
|
| 160 |
+
if os.path.exists(static_dir):
|
| 161 |
+
app.mount("/assets", StaticFiles(directory=os.path.join(static_dir, "assets")), name="assets")
|
| 162 |
+
|
| 163 |
+
@app.get("/{path:path}")
|
| 164 |
+
async def serve_spa(path: str):
|
| 165 |
+
"""Serve the React SPA for all non-API routes"""
|
| 166 |
+
file_path = os.path.join(static_dir, path)
|
| 167 |
+
if os.path.exists(file_path) and os.path.isfile(file_path):
|
| 168 |
+
return FileResponse(file_path)
|
| 169 |
+
return FileResponse(os.path.join(static_dir, "index.html"))
|
| 170 |
+
|
| 171 |
+
|
| 172 |
+
if __name__ == "__main__":
|
| 173 |
+
import uvicorn
|
| 174 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|
backend/requirements.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
fastapi==0.109.0
|
| 2 |
+
uvicorn[standard]==0.27.0
|
| 3 |
+
httpx==0.26.0
|
| 4 |
+
python-multipart==0.0.6
|
| 5 |
+
pydantic==2.5.3
|
frontend/index.html
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
+
<title>Seventh Sense AI - Face Recognition</title>
|
| 8 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 9 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 10 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap" rel="stylesheet">
|
| 11 |
+
</head>
|
| 12 |
+
<body>
|
| 13 |
+
<div id="root"></div>
|
| 14 |
+
<script type="module" src="/src/main.jsx"></script>
|
| 15 |
+
</body>
|
| 16 |
+
</html>
|
frontend/package-lock.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
frontend/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "seventh-sense-face-recognition",
|
| 3 |
+
"version": "1.0.0",
|
| 4 |
+
"type": "module",
|
| 5 |
+
"scripts": {
|
| 6 |
+
"dev": "vite",
|
| 7 |
+
"build": "vite build",
|
| 8 |
+
"preview": "vite preview"
|
| 9 |
+
},
|
| 10 |
+
"dependencies": {
|
| 11 |
+
"react": "^18.2.0",
|
| 12 |
+
"react-dom": "^18.2.0",
|
| 13 |
+
"react-dropzone": "^14.2.3",
|
| 14 |
+
"framer-motion": "^11.0.0",
|
| 15 |
+
"lucide-react": "^0.312.0",
|
| 16 |
+
"axios": "^1.6.5"
|
| 17 |
+
},
|
| 18 |
+
"devDependencies": {
|
| 19 |
+
"@vitejs/plugin-react": "^4.2.1",
|
| 20 |
+
"vite": "^5.0.12",
|
| 21 |
+
"autoprefixer": "^10.4.17",
|
| 22 |
+
"postcss": "^8.4.33",
|
| 23 |
+
"tailwindcss": "^3.4.1"
|
| 24 |
+
}
|
| 25 |
+
}
|
frontend/postcss.config.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export default {
|
| 2 |
+
plugins: {
|
| 3 |
+
tailwindcss: {},
|
| 4 |
+
autoprefixer: {},
|
| 5 |
+
},
|
| 6 |
+
}
|
frontend/public/favicon.svg
ADDED
|
|
frontend/public/logo.png
ADDED
|
frontend/public/seventhsense-logo.png
ADDED
|
frontend/src/App.jsx
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { useState } from 'react'
|
| 2 |
+
import { motion, AnimatePresence } from 'framer-motion'
|
| 3 |
+
import Header from './components/Header'
|
| 4 |
+
import ImageUpload from './components/ImageUpload'
|
| 5 |
+
import ResultDisplay from './components/ResultDisplay'
|
| 6 |
+
import Features from './components/Features'
|
| 7 |
+
import axios from 'axios'
|
| 8 |
+
|
| 9 |
+
function App() {
|
| 10 |
+
const [image1, setImage1] = useState(null)
|
| 11 |
+
const [image2, setImage2] = useState(null)
|
| 12 |
+
const [result, setResult] = useState(null)
|
| 13 |
+
const [loading, setLoading] = useState(false)
|
| 14 |
+
const [error, setError] = useState(null)
|
| 15 |
+
|
| 16 |
+
const handleCompare = async () => {
|
| 17 |
+
if (!image1 || !image2) {
|
| 18 |
+
setError('Please upload both images')
|
| 19 |
+
return
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
setLoading(true)
|
| 23 |
+
setError(null)
|
| 24 |
+
setResult(null)
|
| 25 |
+
|
| 26 |
+
try {
|
| 27 |
+
const formData = new FormData()
|
| 28 |
+
formData.append('image1', image1.file)
|
| 29 |
+
formData.append('image2', image2.file)
|
| 30 |
+
|
| 31 |
+
const response = await axios.post('/api/compare', formData, {
|
| 32 |
+
headers: { 'Content-Type': 'multipart/form-data' }
|
| 33 |
+
})
|
| 34 |
+
|
| 35 |
+
setResult(response.data)
|
| 36 |
+
} catch (err) {
|
| 37 |
+
setError(err.response?.data?.detail || 'Failed to compare faces. Please try again.')
|
| 38 |
+
} finally {
|
| 39 |
+
setLoading(false)
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
const handleReset = () => {
|
| 44 |
+
setResult(null)
|
| 45 |
+
setImage1(null)
|
| 46 |
+
setImage2(null)
|
| 47 |
+
setError(null)
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
// Clear result when an image is removed
|
| 51 |
+
const handleClearImage1 = () => {
|
| 52 |
+
setResult(null)
|
| 53 |
+
setImage1(null)
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
const handleClearImage2 = () => {
|
| 57 |
+
setResult(null)
|
| 58 |
+
setImage2(null)
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
return (
|
| 62 |
+
<div className="min-h-screen bg-dark-400 bg-animated">
|
| 63 |
+
<div className="relative z-10">
|
| 64 |
+
<Header />
|
| 65 |
+
|
| 66 |
+
<main className="container mx-auto px-4 py-12">
|
| 67 |
+
{/* Hero Section */}
|
| 68 |
+
<motion.div
|
| 69 |
+
initial={{ opacity: 0, y: 20 }}
|
| 70 |
+
animate={{ opacity: 1, y: 0 }}
|
| 71 |
+
className="text-center mb-16 scroll-mt-24"
|
| 72 |
+
>
|
| 73 |
+
<h1 className="text-5xl md:text-7xl font-bold mb-6">
|
| 74 |
+
<span className="gradient-text">Face Recognition</span>
|
| 75 |
+
</h1>
|
| 76 |
+
<p className="text-xl text-gray-400 max-w-2xl mx-auto">
|
| 77 |
+
Advanced AI-powered face comparison technology.
|
| 78 |
+
<br />
|
| 79 |
+
Upload two images to verify if they belong to the same person.
|
| 80 |
+
</p>
|
| 81 |
+
</motion.div>
|
| 82 |
+
|
| 83 |
+
{/* Main Content - Side by Side Layout */}
|
| 84 |
+
<div className={`flex flex-col ${result ? 'lg:flex-row' : ''} gap-6 max-w-7xl mx-auto mb-12`}>
|
| 85 |
+
{/* Upload Section */}
|
| 86 |
+
<motion.div
|
| 87 |
+
initial={{ opacity: 0, y: 30 }}
|
| 88 |
+
animate={{ opacity: 1, y: 0 }}
|
| 89 |
+
transition={{ delay: 0.2 }}
|
| 90 |
+
layout
|
| 91 |
+
className={`glass-card p-6 md:p-8 ${result ? 'lg:w-1/2' : 'w-full max-w-6xl mx-auto'}`}
|
| 92 |
+
>
|
| 93 |
+
<div className="grid md:grid-cols-2 gap-6 mb-6">
|
| 94 |
+
<ImageUpload
|
| 95 |
+
label="First Image"
|
| 96 |
+
image={image1}
|
| 97 |
+
onImageSelect={setImage1}
|
| 98 |
+
onClear={handleClearImage1}
|
| 99 |
+
/>
|
| 100 |
+
<ImageUpload
|
| 101 |
+
label="Second Image"
|
| 102 |
+
image={image2}
|
| 103 |
+
onImageSelect={setImage2}
|
| 104 |
+
onClear={handleClearImage2}
|
| 105 |
+
/>
|
| 106 |
+
</div>
|
| 107 |
+
|
| 108 |
+
{/* Action Buttons - Smaller */}
|
| 109 |
+
<div className="flex flex-col sm:flex-row gap-3 justify-center">
|
| 110 |
+
<motion.button
|
| 111 |
+
whileHover={{ scale: 1.02 }}
|
| 112 |
+
whileTap={{ scale: 0.98 }}
|
| 113 |
+
onClick={handleCompare}
|
| 114 |
+
disabled={!image1 || !image2 || loading}
|
| 115 |
+
className={`
|
| 116 |
+
px-4 py-2 rounded-md font-medium text-sm
|
| 117 |
+
transition-all duration-300
|
| 118 |
+
${image1 && image2 && !loading
|
| 119 |
+
? 'bg-gradient-to-r from-primary-500 via-orange-600 to-orange-500 text-white shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30'
|
| 120 |
+
: 'bg-gray-700/50 text-gray-400 cursor-not-allowed'
|
| 121 |
+
}
|
| 122 |
+
`}
|
| 123 |
+
>
|
| 124 |
+
{loading ? (
|
| 125 |
+
<span className="flex items-center gap-2">
|
| 126 |
+
<svg className="animate-spin h-3 w-3" viewBox="0 0 24 24">
|
| 127 |
+
<circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" fill="none" />
|
| 128 |
+
<path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" />
|
| 129 |
+
</svg>
|
| 130 |
+
Analyzing...
|
| 131 |
+
</span>
|
| 132 |
+
) : (
|
| 133 |
+
'Compare Faces'
|
| 134 |
+
)}
|
| 135 |
+
</motion.button>
|
| 136 |
+
|
| 137 |
+
{(image1 || image2 || result) && (
|
| 138 |
+
<motion.button
|
| 139 |
+
initial={{ opacity: 0 }}
|
| 140 |
+
animate={{ opacity: 1 }}
|
| 141 |
+
whileHover={{ scale: 1.02 }}
|
| 142 |
+
whileTap={{ scale: 0.98 }}
|
| 143 |
+
onClick={handleReset}
|
| 144 |
+
className="px-4 py-2 rounded-md font-medium text-sm border border-gray-600 text-gray-300 hover:bg-gray-800/50 transition-all"
|
| 145 |
+
>
|
| 146 |
+
Reset
|
| 147 |
+
</motion.button>
|
| 148 |
+
)}
|
| 149 |
+
</div>
|
| 150 |
+
|
| 151 |
+
{/* Error Display */}
|
| 152 |
+
<AnimatePresence>
|
| 153 |
+
{error && (
|
| 154 |
+
<motion.div
|
| 155 |
+
initial={{ opacity: 0, y: -10 }}
|
| 156 |
+
animate={{ opacity: 1, y: 0 }}
|
| 157 |
+
exit={{ opacity: 0, y: -10 }}
|
| 158 |
+
className="mt-4 p-3 bg-red-500/10 border border-red-500/30 rounded-lg text-red-400 text-center text-sm"
|
| 159 |
+
>
|
| 160 |
+
{error}
|
| 161 |
+
</motion.div>
|
| 162 |
+
)}
|
| 163 |
+
</AnimatePresence>
|
| 164 |
+
</motion.div>
|
| 165 |
+
|
| 166 |
+
{/* Results Section - Shows on Right, exits to Right */}
|
| 167 |
+
<AnimatePresence mode="wait">
|
| 168 |
+
{result && image1 && image2 && (
|
| 169 |
+
<motion.div
|
| 170 |
+
key="result"
|
| 171 |
+
initial={{ opacity: 0, x: 100 }}
|
| 172 |
+
animate={{ opacity: 1, x: 0 }}
|
| 173 |
+
exit={{ opacity: 0, x: 100 }}
|
| 174 |
+
transition={{ type: 'spring', damping: 25, stiffness: 200 }}
|
| 175 |
+
className="lg:w-1/2"
|
| 176 |
+
>
|
| 177 |
+
<ResultDisplay result={result} image1={image1} image2={image2} />
|
| 178 |
+
</motion.div>
|
| 179 |
+
)}
|
| 180 |
+
</AnimatePresence>
|
| 181 |
+
</div>
|
| 182 |
+
|
| 183 |
+
{/* Features Section */}
|
| 184 |
+
<Features />
|
| 185 |
+
</main>
|
| 186 |
+
|
| 187 |
+
{/* Footer */}
|
| 188 |
+
<footer className="border-t border-gray-800 py-8 mt-20">
|
| 189 |
+
<div className="container mx-auto px-4 text-center text-gray-500">
|
| 190 |
+
<p>© 2026 Seventh Sense AI. All rights reserved.</p>
|
| 191 |
+
</div>
|
| 192 |
+
</footer>
|
| 193 |
+
</div>
|
| 194 |
+
</div>
|
| 195 |
+
)
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
export default App
|
frontend/src/components/Features.jsx
ADDED
|
@@ -0,0 +1,320 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { motion } from 'framer-motion'
|
| 2 |
+
import { Shield, Zap, Lock, Globe, Cpu, BarChart3, ExternalLink, Code, FileCode, Terminal } from 'lucide-react'
|
| 3 |
+
|
| 4 |
+
const features = [
|
| 5 |
+
{
|
| 6 |
+
icon: <Lock className="w-6 h-6" />,
|
| 7 |
+
title: 'Privacy-Centric',
|
| 8 |
+
description: 'Facial verification without biometric storage. Your data stays under your control, fully GDPR compliant.',
|
| 9 |
+
color: 'from-green-500 to-emerald-500',
|
| 10 |
+
},
|
| 11 |
+
{
|
| 12 |
+
icon: <Shield className="w-6 h-6" />,
|
| 13 |
+
title: 'Zero Storage Architecture',
|
| 14 |
+
description: 'No biometric data is stored on our servers. Process and forget - true privacy by design.',
|
| 15 |
+
color: 'from-blue-500 to-cyan-500',
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
icon: <BarChart3 className="w-6 h-6" />,
|
| 19 |
+
title: 'NIST Top 10 Ranked',
|
| 20 |
+
description: 'OpenCV FR algorithm ranked among Top 10 globally by NIST FRVT benchmark.',
|
| 21 |
+
color: 'from-red-500 to-rose-500',
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
icon: <Zap className="w-6 h-6" />,
|
| 25 |
+
title: 'Lightning Fast',
|
| 26 |
+
description: 'Process face comparisons in milliseconds with our optimized cloud infrastructure.',
|
| 27 |
+
color: 'from-yellow-500 to-orange-500',
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
icon: <Globe className="w-6 h-6" />,
|
| 31 |
+
title: 'Global Cloud',
|
| 32 |
+
description: 'Deployed in Singapore, US, and Europe for low-latency access worldwide.',
|
| 33 |
+
color: 'from-purple-500 to-pink-500',
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
icon: <Cpu className="w-6 h-6" />,
|
| 37 |
+
title: 'Multi-Platform SDKs',
|
| 38 |
+
description: 'Integrate with Python, C++, or REST API. Flexible solutions for any platform.',
|
| 39 |
+
color: 'from-primary-500 to-secondary-400',
|
| 40 |
+
},
|
| 41 |
+
]
|
| 42 |
+
|
| 43 |
+
const sdkOptions = [
|
| 44 |
+
{
|
| 45 |
+
icon: <Code className="w-6 h-6" />,
|
| 46 |
+
title: 'Python SDK',
|
| 47 |
+
description: 'Full-featured Python library for face recognition',
|
| 48 |
+
url: 'https://docs.opencv.fr/python/',
|
| 49 |
+
color: 'from-yellow-500 to-orange-500',
|
| 50 |
+
},
|
| 51 |
+
{
|
| 52 |
+
icon: <FileCode className="w-6 h-6" />,
|
| 53 |
+
title: 'C++ SDK',
|
| 54 |
+
description: 'High-performance native C++ integration',
|
| 55 |
+
url: 'https://docs.opencv.fr/cpp/',
|
| 56 |
+
color: 'from-blue-500 to-cyan-500',
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
icon: <Terminal className="w-6 h-6" />,
|
| 60 |
+
title: 'REST API',
|
| 61 |
+
description: 'Language-agnostic HTTP API endpoints',
|
| 62 |
+
url: 'https://sg.opencv.fr/docs',
|
| 63 |
+
color: 'from-green-500 to-emerald-500',
|
| 64 |
+
},
|
| 65 |
+
]
|
| 66 |
+
|
| 67 |
+
function Features() {
|
| 68 |
+
return (
|
| 69 |
+
<section className="py-20">
|
| 70 |
+
{/* API Programming Guide Section - FIRST */}
|
| 71 |
+
<motion.div
|
| 72 |
+
id="api"
|
| 73 |
+
initial={{ opacity: 0, y: 30 }}
|
| 74 |
+
whileInView={{ opacity: 1, y: 0 }}
|
| 75 |
+
viewport={{ once: true }}
|
| 76 |
+
className="glass-card p-8 md:p-12 max-w-5xl mx-auto scroll-mt-42"
|
| 77 |
+
>
|
| 78 |
+
<div className="text-center mb-10">
|
| 79 |
+
<h3 className="text-3xl font-bold mb-4">
|
| 80 |
+
<span className="gradient-text">API Programming Guide</span>
|
| 81 |
+
</h3>
|
| 82 |
+
<p className="text-gray-400">
|
| 83 |
+
Choose your preferred SDK or API to integrate face recognition
|
| 84 |
+
</p>
|
| 85 |
+
</div>
|
| 86 |
+
|
| 87 |
+
{/* SDK Options Grid */}
|
| 88 |
+
<div className="grid grid-cols-3 gap-4 mb-10">
|
| 89 |
+
{sdkOptions.map((sdk, index) => (
|
| 90 |
+
<motion.a
|
| 91 |
+
key={sdk.title}
|
| 92 |
+
href={sdk.url}
|
| 93 |
+
target="_blank"
|
| 94 |
+
rel="noopener noreferrer"
|
| 95 |
+
initial={{ opacity: 0, y: 20 }}
|
| 96 |
+
whileInView={{ opacity: 1, y: 0 }}
|
| 97 |
+
viewport={{ once: true }}
|
| 98 |
+
transition={{ delay: index * 0.1 }}
|
| 99 |
+
whileHover={{ scale: 1.05, y: -5 }}
|
| 100 |
+
className="glass p-5 rounded-xl text-center group hover:border-primary-500/50 transition-all cursor-pointer"
|
| 101 |
+
>
|
| 102 |
+
<div className={`
|
| 103 |
+
inline-flex p-3 rounded-xl mb-3
|
| 104 |
+
bg-gradient-to-br ${sdk.color}
|
| 105 |
+
group-hover:scale-110 transition-transform
|
| 106 |
+
`}>
|
| 107 |
+
<div className="text-white">{sdk.icon}</div>
|
| 108 |
+
</div>
|
| 109 |
+
<h4 className="text-white font-semibold mb-1">{sdk.title}</h4>
|
| 110 |
+
<p className="text-gray-500 text-xs">{sdk.description}</p>
|
| 111 |
+
<ExternalLink className="w-4 h-4 text-gray-600 mx-auto mt-2 group-hover:text-primary-400 transition-colors" />
|
| 112 |
+
</motion.a>
|
| 113 |
+
))}
|
| 114 |
+
</div>
|
| 115 |
+
|
| 116 |
+
{/* Code Example */}
|
| 117 |
+
<div className="bg-dark-300 rounded-xl p-6 overflow-x-auto mb-8">
|
| 118 |
+
<div className="flex items-center gap-2 mb-4 text-gray-500 text-sm">
|
| 119 |
+
<Code className="w-4 h-4" />
|
| 120 |
+
<span>Python Example</span>
|
| 121 |
+
</div>
|
| 122 |
+
<pre className="text-sm">
|
| 123 |
+
<code className="text-gray-300">
|
| 124 |
+
<span className="text-purple-400">import</span>{' '}
|
| 125 |
+
<span className="text-blue-400">requests</span>
|
| 126 |
+
{'\n'}
|
| 127 |
+
<span className="text-purple-400">import</span>{' '}
|
| 128 |
+
<span className="text-blue-400">base64</span>
|
| 129 |
+
{'\n\n'}
|
| 130 |
+
<span className="text-gray-500"># Encode images to base64</span>
|
| 131 |
+
{'\n'}
|
| 132 |
+
<span className="text-blue-400">probe</span>{' '}
|
| 133 |
+
<span className="text-white">=</span>{' '}
|
| 134 |
+
<span className="text-white">[</span>
|
| 135 |
+
<span className="text-yellow-400">base64</span>
|
| 136 |
+
<span className="text-white">.</span>
|
| 137 |
+
<span className="text-yellow-400">b64encode</span>
|
| 138 |
+
<span className="text-white">(</span>
|
| 139 |
+
<span className="text-yellow-400">open</span>
|
| 140 |
+
<span className="text-white">(</span>
|
| 141 |
+
<span className="text-green-400">"face1.jpg"</span>
|
| 142 |
+
<span className="text-white">,</span>{' '}
|
| 143 |
+
<span className="text-green-400">"rb"</span>
|
| 144 |
+
<span className="text-white">).</span>
|
| 145 |
+
<span className="text-yellow-400">read</span>
|
| 146 |
+
<span className="text-white">()).</span>
|
| 147 |
+
<span className="text-yellow-400">decode</span>
|
| 148 |
+
<span className="text-white">()]</span>
|
| 149 |
+
{'\n'}
|
| 150 |
+
<span className="text-blue-400">gallery</span>{' '}
|
| 151 |
+
<span className="text-white">=</span>{' '}
|
| 152 |
+
<span className="text-white">[</span>
|
| 153 |
+
<span className="text-yellow-400">base64</span>
|
| 154 |
+
<span className="text-white">.</span>
|
| 155 |
+
<span className="text-yellow-400">b64encode</span>
|
| 156 |
+
<span className="text-white">(</span>
|
| 157 |
+
<span className="text-yellow-400">open</span>
|
| 158 |
+
<span className="text-white">(</span>
|
| 159 |
+
<span className="text-green-400">"face2.jpg"</span>
|
| 160 |
+
<span className="text-white">,</span>{' '}
|
| 161 |
+
<span className="text-green-400">"rb"</span>
|
| 162 |
+
<span className="text-white">).</span>
|
| 163 |
+
<span className="text-yellow-400">read</span>
|
| 164 |
+
<span className="text-white">()).</span>
|
| 165 |
+
<span className="text-yellow-400">decode</span>
|
| 166 |
+
<span className="text-white">()]</span>
|
| 167 |
+
{'\n\n'}
|
| 168 |
+
<span className="text-gray-500"># Compare faces</span>
|
| 169 |
+
{'\n'}
|
| 170 |
+
<span className="text-blue-400">response</span>{' '}
|
| 171 |
+
<span className="text-white">=</span>{' '}
|
| 172 |
+
<span className="text-blue-400">requests</span>
|
| 173 |
+
<span className="text-white">.</span>
|
| 174 |
+
<span className="text-yellow-400">post</span>
|
| 175 |
+
<span className="text-white">(</span>
|
| 176 |
+
{'\n'}
|
| 177 |
+
{' '}<span className="text-green-400">"https://sg.opencv.fr/compare"</span>
|
| 178 |
+
<span className="text-white">,</span>
|
| 179 |
+
{'\n'}
|
| 180 |
+
{' '}<span className="text-blue-400">json</span>
|
| 181 |
+
<span className="text-white">=</span>
|
| 182 |
+
<span className="text-white">{'{'}</span>
|
| 183 |
+
<span className="text-green-400">"probe"</span>
|
| 184 |
+
<span className="text-white">:</span>{' '}
|
| 185 |
+
<span className="text-blue-400">probe</span>
|
| 186 |
+
<span className="text-white">,</span>{' '}
|
| 187 |
+
<span className="text-green-400">"gallery"</span>
|
| 188 |
+
<span className="text-white">:</span>{' '}
|
| 189 |
+
<span className="text-blue-400">gallery</span>
|
| 190 |
+
<span className="text-white">{'}'}</span>
|
| 191 |
+
<span className="text-white">,</span>
|
| 192 |
+
{'\n'}
|
| 193 |
+
{' '}<span className="text-blue-400">headers</span>
|
| 194 |
+
<span className="text-white">=</span>
|
| 195 |
+
<span className="text-white">{'{'}</span>
|
| 196 |
+
<span className="text-green-400">"x-api-key"</span>
|
| 197 |
+
<span className="text-white">:</span>{' '}
|
| 198 |
+
<span className="text-blue-400">API_KEY</span>
|
| 199 |
+
<span className="text-white">{'}'}</span>
|
| 200 |
+
{'\n'}
|
| 201 |
+
<span className="text-white">)</span>
|
| 202 |
+
{'\n\n'}
|
| 203 |
+
<span className="text-blue-400">score</span>{' '}
|
| 204 |
+
<span className="text-white">=</span>{' '}
|
| 205 |
+
<span className="text-blue-400">response</span>
|
| 206 |
+
<span className="text-white">.</span>
|
| 207 |
+
<span className="text-yellow-400">json</span>
|
| 208 |
+
<span className="text-white">()[</span>
|
| 209 |
+
<span className="text-green-400">"score"</span>
|
| 210 |
+
<span className="text-white">]</span>
|
| 211 |
+
{' '}
|
| 212 |
+
<span className="text-gray-500"># 0.0 to 1.0</span>
|
| 213 |
+
</code>
|
| 214 |
+
</pre>
|
| 215 |
+
<p className="text-gray-500 text-sm mt-3">
|
| 216 |
+
Regions: <span className="text-gray-400">sg.opencv.fr</span> (Singapore) | <span className="text-gray-400">us.opencv.fr</span> (US) | <span className="text-gray-400">eu.opencv.fr</span> (Europe)
|
| 217 |
+
</p>
|
| 218 |
+
</div>
|
| 219 |
+
|
| 220 |
+
{/* CTA Buttons */}
|
| 221 |
+
<div className="flex flex-col sm:flex-row gap-4 justify-center">
|
| 222 |
+
<a
|
| 223 |
+
href="https://developer.opencv.fr/ui/#/onboard/login"
|
| 224 |
+
target="_blank"
|
| 225 |
+
rel="noopener noreferrer"
|
| 226 |
+
className="px-8 py-4 rounded-xl bg-gradient-to-r from-primary-500 to-secondary-400 text-white font-semibold text-center hover:shadow-lg hover:shadow-primary-500/30 transition-all flex items-center justify-center gap-2"
|
| 227 |
+
>
|
| 228 |
+
Get Free API Key
|
| 229 |
+
<ExternalLink className="w-4 h-4" />
|
| 230 |
+
</a>
|
| 231 |
+
</div>
|
| 232 |
+
|
| 233 |
+
{/* Additional Info */}
|
| 234 |
+
<p className="text-center text-gray-500 text-sm mt-6">
|
| 235 |
+
Sign up at{' '}
|
| 236 |
+
<a
|
| 237 |
+
href="https://developer.opencv.fr"
|
| 238 |
+
target="_blank"
|
| 239 |
+
rel="noopener noreferrer"
|
| 240 |
+
className="text-primary-400 hover:text-primary-300 transition-colors"
|
| 241 |
+
>
|
| 242 |
+
developer.opencv.fr
|
| 243 |
+
</a>
|
| 244 |
+
{' '}to get your API key and start building
|
| 245 |
+
</p>
|
| 246 |
+
</motion.div>
|
| 247 |
+
|
| 248 |
+
{/* Why Choose Us Section - SECOND */}
|
| 249 |
+
<div id="features" className="mt-24 scroll-mt-24">
|
| 250 |
+
<motion.div
|
| 251 |
+
initial={{ opacity: 0, y: 20 }}
|
| 252 |
+
whileInView={{ opacity: 1, y: 0 }}
|
| 253 |
+
viewport={{ once: true }}
|
| 254 |
+
className="text-center mb-16"
|
| 255 |
+
>
|
| 256 |
+
<h2 className="text-4xl md:text-5xl font-bold mb-4">
|
| 257 |
+
Why Choose <span className="gradient-text">Seventh Sense AI</span>
|
| 258 |
+
</h2>
|
| 259 |
+
<p className="text-gray-400 text-lg max-w-4xl mx-auto">
|
| 260 |
+
The face of a smarter, safer future.
|
| 261 |
+
<br />
|
| 262 |
+
Privacy-centric facial recognition and video analysis solutions for enterprises and governments.
|
| 263 |
+
</p>
|
| 264 |
+
</motion.div>
|
| 265 |
+
|
| 266 |
+
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-6xl mx-auto">
|
| 267 |
+
{features.map((feature, index) => (
|
| 268 |
+
<motion.div
|
| 269 |
+
key={feature.title}
|
| 270 |
+
initial={{ opacity: 0, y: 30 }}
|
| 271 |
+
whileInView={{ opacity: 1, y: 0 }}
|
| 272 |
+
viewport={{ once: true }}
|
| 273 |
+
transition={{ delay: index * 0.1 }}
|
| 274 |
+
>
|
| 275 |
+
<FeatureCard {...feature} />
|
| 276 |
+
</motion.div>
|
| 277 |
+
))}
|
| 278 |
+
</div>
|
| 279 |
+
</div>
|
| 280 |
+
|
| 281 |
+
{/* Learn More Section */}
|
| 282 |
+
<motion.div
|
| 283 |
+
initial={{ opacity: 0, y: 20 }}
|
| 284 |
+
whileInView={{ opacity: 1, y: 0 }}
|
| 285 |
+
viewport={{ once: true }}
|
| 286 |
+
className="mt-16 text-center"
|
| 287 |
+
>
|
| 288 |
+
<p className="text-gray-400">
|
| 289 |
+
Learn more about Seventh Sense AI at{' '}
|
| 290 |
+
<a
|
| 291 |
+
href="https://www.seventhsense.ai"
|
| 292 |
+
target="_blank"
|
| 293 |
+
rel="noopener noreferrer"
|
| 294 |
+
className="text-primary-400 hover:text-primary-300 transition-colors"
|
| 295 |
+
>
|
| 296 |
+
www.seventhsense.ai
|
| 297 |
+
</a>
|
| 298 |
+
</p>
|
| 299 |
+
</motion.div>
|
| 300 |
+
</section>
|
| 301 |
+
)
|
| 302 |
+
}
|
| 303 |
+
|
| 304 |
+
function FeatureCard({ icon, title, description, color }) {
|
| 305 |
+
return (
|
| 306 |
+
<div className="glass-card p-6 h-full group hover:border-primary-500/30 transition-colors">
|
| 307 |
+
<div className={`
|
| 308 |
+
inline-flex p-3 rounded-xl mb-4
|
| 309 |
+
bg-gradient-to-br ${color} bg-opacity-20
|
| 310 |
+
group-hover:scale-110 transition-transform
|
| 311 |
+
`}>
|
| 312 |
+
<div className="text-white">{icon}</div>
|
| 313 |
+
</div>
|
| 314 |
+
<h3 className="text-xl font-semibold text-white mb-2">{title}</h3>
|
| 315 |
+
<p className="text-gray-400">{description}</p>
|
| 316 |
+
</div>
|
| 317 |
+
)
|
| 318 |
+
}
|
| 319 |
+
|
| 320 |
+
export default Features
|
frontend/src/components/Header.jsx
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { motion } from 'framer-motion'
|
| 2 |
+
import { Menu, X } from 'lucide-react'
|
| 3 |
+
import { useState } from 'react'
|
| 4 |
+
|
| 5 |
+
function Header() {
|
| 6 |
+
const [mobileMenuOpen, setMobileMenuOpen] = useState(false)
|
| 7 |
+
|
| 8 |
+
return (
|
| 9 |
+
<header className="relative z-50">
|
| 10 |
+
<nav className="container mx-auto px-4 py-6">
|
| 11 |
+
<div className="flex items-center justify-between">
|
| 12 |
+
{/* Logo */}
|
| 13 |
+
<motion.a
|
| 14 |
+
href="/"
|
| 15 |
+
initial={{ opacity: 0, x: -20 }}
|
| 16 |
+
animate={{ opacity: 1, x: 0 }}
|
| 17 |
+
className="flex items-center gap-3 group"
|
| 18 |
+
>
|
| 19 |
+
<img
|
| 20 |
+
src="/logo.png"
|
| 21 |
+
alt="Seventh Sense AI"
|
| 22 |
+
className="h-10 object-contain group-hover:scale-105 transition-transform mix-blend-lighten"
|
| 23 |
+
/>
|
| 24 |
+
</motion.a>
|
| 25 |
+
|
| 26 |
+
{/* Desktop Navigation */}
|
| 27 |
+
<motion.div
|
| 28 |
+
initial={{ opacity: 0, x: 20 }}
|
| 29 |
+
animate={{ opacity: 1, x: 0 }}
|
| 30 |
+
className="hidden md:flex items-center gap-8"
|
| 31 |
+
>
|
| 32 |
+
<NavLink href="#compare">Compare</NavLink>
|
| 33 |
+
<NavLink href="#api">API</NavLink>
|
| 34 |
+
<NavLink href="#features">Features</NavLink>
|
| 35 |
+
<motion.a
|
| 36 |
+
href="#api"
|
| 37 |
+
whileHover={{ scale: 1.05 }}
|
| 38 |
+
whileTap={{ scale: 0.95 }}
|
| 39 |
+
className="px-5 py-2.5 rounded-xl bg-gradient-to-r from-primary-500 to-secondary-400 text-white font-medium shadow-lg shadow-primary-500/25 hover:shadow-primary-500/40 transition-shadow"
|
| 40 |
+
>
|
| 41 |
+
Get Started
|
| 42 |
+
</motion.a>
|
| 43 |
+
</motion.div>
|
| 44 |
+
|
| 45 |
+
{/* Mobile Menu Button */}
|
| 46 |
+
<button
|
| 47 |
+
onClick={() => setMobileMenuOpen(!mobileMenuOpen)}
|
| 48 |
+
className="md:hidden p-2 text-gray-400 hover:text-white transition-colors"
|
| 49 |
+
>
|
| 50 |
+
{mobileMenuOpen ? <X className="w-6 h-6" /> : <Menu className="w-6 h-6" />}
|
| 51 |
+
</button>
|
| 52 |
+
</div>
|
| 53 |
+
|
| 54 |
+
{/* Mobile Menu */}
|
| 55 |
+
{mobileMenuOpen && (
|
| 56 |
+
<motion.div
|
| 57 |
+
initial={{ opacity: 0, y: -20 }}
|
| 58 |
+
animate={{ opacity: 1, y: 0 }}
|
| 59 |
+
className="md:hidden mt-4 p-6 glass-card"
|
| 60 |
+
>
|
| 61 |
+
<div className="flex flex-col gap-4">
|
| 62 |
+
<NavLink href="#compare" mobile>Compare</NavLink>
|
| 63 |
+
<NavLink href="#api" mobile>API</NavLink>
|
| 64 |
+
<NavLink href="#features" mobile>Features</NavLink>
|
| 65 |
+
<a
|
| 66 |
+
href="#api"
|
| 67 |
+
className="mt-2 px-5 py-3 rounded-xl bg-gradient-to-r from-primary-500 to-secondary-400 text-white font-medium text-center"
|
| 68 |
+
>
|
| 69 |
+
Get Started
|
| 70 |
+
</a>
|
| 71 |
+
</div>
|
| 72 |
+
</motion.div>
|
| 73 |
+
)}
|
| 74 |
+
</nav>
|
| 75 |
+
</header>
|
| 76 |
+
)
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
function NavLink({ href, children, external, mobile }) {
|
| 80 |
+
const baseClass = mobile
|
| 81 |
+
? 'text-gray-300 hover:text-white transition-colors py-2'
|
| 82 |
+
: 'text-gray-400 hover:text-white transition-colors relative group'
|
| 83 |
+
|
| 84 |
+
if (external) {
|
| 85 |
+
return (
|
| 86 |
+
<a href={href} target="_blank" rel="noopener noreferrer" className={baseClass}>
|
| 87 |
+
{children}
|
| 88 |
+
{!mobile && (
|
| 89 |
+
<span className="absolute -bottom-1 left-0 w-0 h-0.5 bg-gradient-to-r from-primary-500 to-secondary-400 group-hover:w-full transition-all duration-300" />
|
| 90 |
+
)}
|
| 91 |
+
</a>
|
| 92 |
+
)
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
return (
|
| 96 |
+
<a href={href} className={baseClass}>
|
| 97 |
+
{children}
|
| 98 |
+
{!mobile && (
|
| 99 |
+
<span className="absolute -bottom-1 left-0 w-0 h-0.5 bg-gradient-to-r from-primary-500 to-secondary-400 group-hover:w-full transition-all duration-300" />
|
| 100 |
+
)}
|
| 101 |
+
</a>
|
| 102 |
+
)
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
export default Header
|
frontend/src/components/ImageUpload.jsx
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { useCallback } from 'react'
|
| 2 |
+
import { useDropzone } from 'react-dropzone'
|
| 3 |
+
import { motion, AnimatePresence } from 'framer-motion'
|
| 4 |
+
import { Upload, X, Image as ImageIcon, User } from 'lucide-react'
|
| 5 |
+
|
| 6 |
+
function ImageUpload({ label, image, onImageSelect, onClear }) {
|
| 7 |
+
const onDrop = useCallback((acceptedFiles) => {
|
| 8 |
+
const file = acceptedFiles[0]
|
| 9 |
+
if (file) {
|
| 10 |
+
const preview = URL.createObjectURL(file)
|
| 11 |
+
onImageSelect({ file, preview })
|
| 12 |
+
}
|
| 13 |
+
}, [onImageSelect])
|
| 14 |
+
|
| 15 |
+
const { getRootProps, getInputProps, isDragActive } = useDropzone({
|
| 16 |
+
onDrop,
|
| 17 |
+
accept: {
|
| 18 |
+
'image/*': ['.jpeg', '.jpg', '.png', '.webp']
|
| 19 |
+
},
|
| 20 |
+
maxFiles: 1,
|
| 21 |
+
maxSize: 10 * 1024 * 1024 // 10MB
|
| 22 |
+
})
|
| 23 |
+
|
| 24 |
+
return (
|
| 25 |
+
<div className="relative">
|
| 26 |
+
<label className="block text-sm font-medium text-gray-400 mb-3 flex items-center gap-2">
|
| 27 |
+
<User className="w-4 h-4" />
|
| 28 |
+
{label}
|
| 29 |
+
</label>
|
| 30 |
+
|
| 31 |
+
<AnimatePresence mode="wait">
|
| 32 |
+
{!image ? (
|
| 33 |
+
<motion.div
|
| 34 |
+
key="dropzone"
|
| 35 |
+
initial={{ opacity: 0 }}
|
| 36 |
+
animate={{ opacity: 1 }}
|
| 37 |
+
exit={{ opacity: 0 }}
|
| 38 |
+
{...getRootProps()}
|
| 39 |
+
className={`
|
| 40 |
+
upload-zone relative cursor-pointer
|
| 41 |
+
border-2 border-dashed rounded-2xl p-8
|
| 42 |
+
transition-all duration-300 min-h-[300px]
|
| 43 |
+
flex flex-col items-center justify-center
|
| 44 |
+
${isDragActive
|
| 45 |
+
? 'active border-primary-500 bg-primary-500/10'
|
| 46 |
+
: 'border-gray-700 hover:border-gray-600'
|
| 47 |
+
}
|
| 48 |
+
`}
|
| 49 |
+
>
|
| 50 |
+
<input {...getInputProps()} />
|
| 51 |
+
|
| 52 |
+
{/* Animated upload icon */}
|
| 53 |
+
<motion.div
|
| 54 |
+
animate={isDragActive ? { scale: 1.1, y: -5 } : { scale: 1, y: 0 }}
|
| 55 |
+
transition={{ type: 'spring', stiffness: 300 }}
|
| 56 |
+
className="relative mb-6"
|
| 57 |
+
>
|
| 58 |
+
<div className="w-20 h-20 rounded-2xl bg-gradient-to-br from-primary-500/20 to-purple-500/20 flex items-center justify-center">
|
| 59 |
+
<Upload className={`w-10 h-10 ${isDragActive ? 'text-primary-400' : 'text-gray-500'}`} />
|
| 60 |
+
</div>
|
| 61 |
+
{isDragActive && (
|
| 62 |
+
<motion.div
|
| 63 |
+
initial={{ scale: 0.8, opacity: 0 }}
|
| 64 |
+
animate={{ scale: 1.5, opacity: 0 }}
|
| 65 |
+
transition={{ repeat: Infinity, duration: 1 }}
|
| 66 |
+
className="absolute inset-0 rounded-2xl border-2 border-primary-500"
|
| 67 |
+
/>
|
| 68 |
+
)}
|
| 69 |
+
</motion.div>
|
| 70 |
+
|
| 71 |
+
<p className="text-gray-300 font-medium mb-2">
|
| 72 |
+
{isDragActive ? 'Drop image here' : 'Drag & drop an image'}
|
| 73 |
+
</p>
|
| 74 |
+
<p className="text-sm text-gray-500">
|
| 75 |
+
or <span className="text-primary-400 hover:text-primary-300">browse files</span>
|
| 76 |
+
</p>
|
| 77 |
+
<p className="text-xs text-gray-600 mt-4">
|
| 78 |
+
Supports: JPG, PNG, WebP (max 10MB)
|
| 79 |
+
</p>
|
| 80 |
+
</motion.div>
|
| 81 |
+
) : (
|
| 82 |
+
<motion.div
|
| 83 |
+
key="preview"
|
| 84 |
+
initial={{ opacity: 0, scale: 0.95 }}
|
| 85 |
+
animate={{ opacity: 1, scale: 1 }}
|
| 86 |
+
exit={{ opacity: 0, scale: 0.95 }}
|
| 87 |
+
className="relative rounded-2xl overflow-hidden group min-h-[300px] bg-dark-200"
|
| 88 |
+
>
|
| 89 |
+
{/* Image preview */}
|
| 90 |
+
<img
|
| 91 |
+
src={image.preview}
|
| 92 |
+
alt="Preview"
|
| 93 |
+
className="w-full h-[300px] object-cover"
|
| 94 |
+
/>
|
| 95 |
+
|
| 96 |
+
{/* Overlay on hover */}
|
| 97 |
+
<div className="absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300" />
|
| 98 |
+
|
| 99 |
+
{/* Clear button */}
|
| 100 |
+
<motion.button
|
| 101 |
+
initial={{ opacity: 0, scale: 0.8 }}
|
| 102 |
+
animate={{ opacity: 1, scale: 1 }}
|
| 103 |
+
whileHover={{ scale: 1.1 }}
|
| 104 |
+
whileTap={{ scale: 0.9 }}
|
| 105 |
+
onClick={(e) => {
|
| 106 |
+
e.stopPropagation()
|
| 107 |
+
onClear()
|
| 108 |
+
}}
|
| 109 |
+
className="absolute top-3 right-3 w-10 h-10 rounded-full bg-black/50 backdrop-blur-sm flex items-center justify-center text-white hover:bg-red-500/80 transition-colors"
|
| 110 |
+
>
|
| 111 |
+
<X className="w-5 h-5" />
|
| 112 |
+
</motion.button>
|
| 113 |
+
|
| 114 |
+
{/* File info */}
|
| 115 |
+
<div className="absolute bottom-0 left-0 right-0 p-4 opacity-0 group-hover:opacity-100 transition-opacity">
|
| 116 |
+
<div className="flex items-center gap-2 text-sm text-white">
|
| 117 |
+
<ImageIcon className="w-4 h-4" />
|
| 118 |
+
<span className="truncate">{image.file.name}</span>
|
| 119 |
+
</div>
|
| 120 |
+
</div>
|
| 121 |
+
|
| 122 |
+
{/* Success indicator */}
|
| 123 |
+
<div className="absolute top-3 left-3">
|
| 124 |
+
<div className="w-3 h-3 rounded-full bg-green-500 shadow-lg shadow-green-500/50" />
|
| 125 |
+
</div>
|
| 126 |
+
</motion.div>
|
| 127 |
+
)}
|
| 128 |
+
</AnimatePresence>
|
| 129 |
+
</div>
|
| 130 |
+
)
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
export default ImageUpload
|
frontend/src/components/ResultDisplay.jsx
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { motion } from 'framer-motion'
|
| 2 |
+
import { CheckCircle2, XCircle } from 'lucide-react'
|
| 3 |
+
|
| 4 |
+
function ResultDisplay({ result, image1, image2 }) {
|
| 5 |
+
const isMatch = result.match
|
| 6 |
+
const similarity = Math.round(result.similarity * 100)
|
| 7 |
+
|
| 8 |
+
return (
|
| 9 |
+
<div className={`
|
| 10 |
+
glass-card p-6 md:p-8 h-full relative overflow-hidden
|
| 11 |
+
${isMatch ? 'border-green-500/30' : 'border-red-500/30'}
|
| 12 |
+
`}>
|
| 13 |
+
{/* Background glow effect */}
|
| 14 |
+
<div className={`
|
| 15 |
+
absolute inset-0 opacity-20
|
| 16 |
+
${isMatch
|
| 17 |
+
? 'bg-gradient-radial from-green-500/30 via-transparent to-transparent'
|
| 18 |
+
: 'bg-gradient-radial from-red-500/30 via-transparent to-transparent'
|
| 19 |
+
}
|
| 20 |
+
`} />
|
| 21 |
+
|
| 22 |
+
{/* Content */}
|
| 23 |
+
<div className="relative z-10">
|
| 24 |
+
{/* Match Status Header */}
|
| 25 |
+
<div className="text-center mb-6">
|
| 26 |
+
<motion.div
|
| 27 |
+
initial={{ scale: 0 }}
|
| 28 |
+
animate={{ scale: 1 }}
|
| 29 |
+
transition={{ type: 'spring', delay: 0.2 }}
|
| 30 |
+
className={`
|
| 31 |
+
inline-flex items-center justify-center w-16 h-16 rounded-full mb-4
|
| 32 |
+
${isMatch
|
| 33 |
+
? 'bg-green-500/20 match-indicator'
|
| 34 |
+
: 'bg-red-500/20 no-match-indicator'
|
| 35 |
+
}
|
| 36 |
+
`}
|
| 37 |
+
>
|
| 38 |
+
{isMatch ? (
|
| 39 |
+
<CheckCircle2 className="w-8 h-8 text-green-400" />
|
| 40 |
+
) : (
|
| 41 |
+
<XCircle className="w-8 h-8 text-red-400" />
|
| 42 |
+
)}
|
| 43 |
+
</motion.div>
|
| 44 |
+
|
| 45 |
+
<motion.h2
|
| 46 |
+
initial={{ opacity: 0, y: 10 }}
|
| 47 |
+
animate={{ opacity: 1, y: 0 }}
|
| 48 |
+
transition={{ delay: 0.3 }}
|
| 49 |
+
className={`text-3xl font-bold mb-2 ${isMatch ? 'text-green-400' : 'text-red-400'}`}
|
| 50 |
+
>
|
| 51 |
+
{isMatch ? 'Match Found' : 'No Match'}
|
| 52 |
+
</motion.h2>
|
| 53 |
+
|
| 54 |
+
<motion.p
|
| 55 |
+
initial={{ opacity: 0 }}
|
| 56 |
+
animate={{ opacity: 1 }}
|
| 57 |
+
transition={{ delay: 0.4 }}
|
| 58 |
+
className="text-gray-400 text-sm"
|
| 59 |
+
>
|
| 60 |
+
{isMatch
|
| 61 |
+
? 'The faces belong to the same person'
|
| 62 |
+
: 'The faces belong to different people'
|
| 63 |
+
}
|
| 64 |
+
</motion.p>
|
| 65 |
+
</div>
|
| 66 |
+
|
| 67 |
+
{/* Face Comparison */}
|
| 68 |
+
<div className="flex items-center justify-center gap-4 mb-6">
|
| 69 |
+
{/* Image 1 */}
|
| 70 |
+
<motion.div
|
| 71 |
+
initial={{ opacity: 0, x: -20 }}
|
| 72 |
+
animate={{ opacity: 1, x: 0 }}
|
| 73 |
+
transition={{ delay: 0.4 }}
|
| 74 |
+
>
|
| 75 |
+
<div className={`
|
| 76 |
+
w-24 h-24 md:w-32 md:h-32 rounded-xl overflow-hidden
|
| 77 |
+
ring-2 ${isMatch ? 'ring-green-500/50' : 'ring-red-500/50'}
|
| 78 |
+
`}>
|
| 79 |
+
<img
|
| 80 |
+
src={image1.preview}
|
| 81 |
+
alt="Face 1"
|
| 82 |
+
className="w-full h-full object-cover"
|
| 83 |
+
/>
|
| 84 |
+
</div>
|
| 85 |
+
</motion.div>
|
| 86 |
+
|
| 87 |
+
{/* Percentage Circle */}
|
| 88 |
+
<motion.div
|
| 89 |
+
initial={{ opacity: 0, scale: 0.8 }}
|
| 90 |
+
animate={{ opacity: 1, scale: 1 }}
|
| 91 |
+
transition={{ delay: 0.5 }}
|
| 92 |
+
className={`
|
| 93 |
+
w-14 h-14 rounded-full flex items-center justify-center
|
| 94 |
+
${isMatch ? 'bg-green-500/20 text-green-400' : 'bg-red-500/20 text-red-400'}
|
| 95 |
+
`}
|
| 96 |
+
>
|
| 97 |
+
<span className="text-lg font-bold">{similarity}%</span>
|
| 98 |
+
</motion.div>
|
| 99 |
+
|
| 100 |
+
{/* Image 2 */}
|
| 101 |
+
<motion.div
|
| 102 |
+
initial={{ opacity: 0, x: 20 }}
|
| 103 |
+
animate={{ opacity: 1, x: 0 }}
|
| 104 |
+
transition={{ delay: 0.4 }}
|
| 105 |
+
>
|
| 106 |
+
<div className={`
|
| 107 |
+
w-24 h-24 md:w-32 md:h-32 rounded-xl overflow-hidden
|
| 108 |
+
ring-2 ${isMatch ? 'ring-green-500/50' : 'ring-red-500/50'}
|
| 109 |
+
`}>
|
| 110 |
+
<img
|
| 111 |
+
src={image2.preview}
|
| 112 |
+
alt="Face 2"
|
| 113 |
+
className="w-full h-full object-cover"
|
| 114 |
+
/>
|
| 115 |
+
</div>
|
| 116 |
+
</motion.div>
|
| 117 |
+
</div>
|
| 118 |
+
|
| 119 |
+
{/* Similarity Meter */}
|
| 120 |
+
<motion.div
|
| 121 |
+
initial={{ opacity: 0, y: 10 }}
|
| 122 |
+
animate={{ opacity: 1, y: 0 }}
|
| 123 |
+
transition={{ delay: 0.6 }}
|
| 124 |
+
>
|
| 125 |
+
<div className="flex justify-between text-xs text-gray-400 mb-1">
|
| 126 |
+
<span>Similarity Score</span>
|
| 127 |
+
<span>{similarity}%</span>
|
| 128 |
+
</div>
|
| 129 |
+
<div className="similarity-meter">
|
| 130 |
+
<motion.div
|
| 131 |
+
initial={{ width: 0 }}
|
| 132 |
+
animate={{ width: `${similarity}%` }}
|
| 133 |
+
transition={{ delay: 0.7, duration: 1, ease: 'easeOut' }}
|
| 134 |
+
className={`similarity-fill ${isMatch
|
| 135 |
+
? 'bg-gradient-to-r from-green-500 to-emerald-400'
|
| 136 |
+
: 'bg-gradient-to-r from-red-500 to-orange-400'
|
| 137 |
+
}`}
|
| 138 |
+
/>
|
| 139 |
+
</div>
|
| 140 |
+
<div className="flex justify-between text-xs text-gray-600 mt-1">
|
| 141 |
+
<span>0%</span>
|
| 142 |
+
<span className="text-gray-500">Threshold: 70%</span>
|
| 143 |
+
<span>100%</span>
|
| 144 |
+
</div>
|
| 145 |
+
</motion.div>
|
| 146 |
+
</div>
|
| 147 |
+
</div>
|
| 148 |
+
)
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
export default ResultDisplay
|
frontend/src/main.jsx
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React from 'react'
|
| 2 |
+
import ReactDOM from 'react-dom/client'
|
| 3 |
+
import App from './App'
|
| 4 |
+
import './styles/index.css'
|
| 5 |
+
|
| 6 |
+
ReactDOM.createRoot(document.getElementById('root')).render(
|
| 7 |
+
<React.StrictMode>
|
| 8 |
+
<App />
|
| 9 |
+
</React.StrictMode>,
|
| 10 |
+
)
|
frontend/src/styles/index.css
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@tailwind base;
|
| 2 |
+
@tailwind components;
|
| 3 |
+
@tailwind utilities;
|
| 4 |
+
|
| 5 |
+
:root {
|
| 6 |
+
--gradient-1: #E53935;
|
| 7 |
+
--gradient-2: #FFC107;
|
| 8 |
+
--gradient-3: #FF9800;
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
* {
|
| 12 |
+
margin: 0;
|
| 13 |
+
padding: 0;
|
| 14 |
+
box-sizing: border-box;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
body {
|
| 18 |
+
font-family: 'Inter', sans-serif;
|
| 19 |
+
background: #0a0a0f;
|
| 20 |
+
color: #ffffff;
|
| 21 |
+
min-height: 100vh;
|
| 22 |
+
overflow-x: hidden;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
h1, h2, h3, h4, h5, h6 {
|
| 26 |
+
font-family: 'Space Grotesk', sans-serif;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
/* Custom scrollbar */
|
| 30 |
+
::-webkit-scrollbar {
|
| 31 |
+
width: 8px;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
::-webkit-scrollbar-track {
|
| 35 |
+
background: #1e1e2e;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
::-webkit-scrollbar-thumb {
|
| 39 |
+
background: #E53935;
|
| 40 |
+
border-radius: 4px;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
::-webkit-scrollbar-thumb:hover {
|
| 44 |
+
background: #EF5350;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
/* Glassmorphism */
|
| 48 |
+
.glass {
|
| 49 |
+
background: rgba(30, 30, 46, 0.6);
|
| 50 |
+
backdrop-filter: blur(20px);
|
| 51 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
.glass-card {
|
| 55 |
+
background: linear-gradient(
|
| 56 |
+
135deg,
|
| 57 |
+
rgba(255, 255, 255, 0.05) 0%,
|
| 58 |
+
rgba(255, 255, 255, 0.02) 100%
|
| 59 |
+
);
|
| 60 |
+
backdrop-filter: blur(20px);
|
| 61 |
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
| 62 |
+
border-radius: 24px;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
/* Gradient text */
|
| 66 |
+
.gradient-text {
|
| 67 |
+
background: linear-gradient(135deg, #E53935 0%, #FFC107 100%);
|
| 68 |
+
-webkit-background-clip: text;
|
| 69 |
+
-webkit-text-fill-color: transparent;
|
| 70 |
+
background-clip: text;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
/* Gradient border */
|
| 74 |
+
.gradient-border {
|
| 75 |
+
position: relative;
|
| 76 |
+
background: #0a0a0f;
|
| 77 |
+
border-radius: 24px;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
.gradient-border::before {
|
| 81 |
+
content: '';
|
| 82 |
+
position: absolute;
|
| 83 |
+
inset: 0;
|
| 84 |
+
border-radius: 24px;
|
| 85 |
+
padding: 2px;
|
| 86 |
+
background: linear-gradient(135deg, #E53935, #FFC107, #FF9800);
|
| 87 |
+
-webkit-mask:
|
| 88 |
+
linear-gradient(#fff 0 0) content-box,
|
| 89 |
+
linear-gradient(#fff 0 0);
|
| 90 |
+
-webkit-mask-composite: xor;
|
| 91 |
+
mask-composite: exclude;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
/* Animated background - clean dark */
|
| 95 |
+
.bg-animated {
|
| 96 |
+
background: #0a0a0f;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
/* Pulse ring animation */
|
| 100 |
+
@keyframes ping-slow {
|
| 101 |
+
75%, 100% {
|
| 102 |
+
transform: scale(1.5);
|
| 103 |
+
opacity: 0;
|
| 104 |
+
}
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
.animate-ping-slow {
|
| 108 |
+
animation: ping-slow 2s cubic-bezier(0, 0, 0.2, 1) infinite;
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
/* Shimmer effect */
|
| 112 |
+
.shimmer {
|
| 113 |
+
background: linear-gradient(
|
| 114 |
+
90deg,
|
| 115 |
+
rgba(255, 255, 255, 0) 0%,
|
| 116 |
+
rgba(255, 255, 255, 0.05) 50%,
|
| 117 |
+
rgba(255, 255, 255, 0) 100%
|
| 118 |
+
);
|
| 119 |
+
background-size: 200% 100%;
|
| 120 |
+
animation: shimmer 2s infinite;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
@keyframes shimmer {
|
| 124 |
+
0% { background-position: 200% 0; }
|
| 125 |
+
100% { background-position: -200% 0; }
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
/* Upload zone styles */
|
| 129 |
+
.upload-zone {
|
| 130 |
+
transition: all 0.3s ease;
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
.upload-zone:hover {
|
| 134 |
+
border-color: rgba(229, 57, 53, 0.5);
|
| 135 |
+
background: rgba(229, 57, 53, 0.05);
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
.upload-zone.active {
|
| 139 |
+
border-color: #E53935;
|
| 140 |
+
background: rgba(229, 57, 53, 0.1);
|
| 141 |
+
box-shadow: 0 0 40px rgba(229, 57, 53, 0.2);
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
/* Result card animations */
|
| 145 |
+
.result-enter {
|
| 146 |
+
animation: resultEnter 0.5s ease-out forwards;
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
@keyframes resultEnter {
|
| 150 |
+
from {
|
| 151 |
+
opacity: 0;
|
| 152 |
+
transform: translateY(20px) scale(0.95);
|
| 153 |
+
}
|
| 154 |
+
to {
|
| 155 |
+
opacity: 1;
|
| 156 |
+
transform: translateY(0) scale(1);
|
| 157 |
+
}
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
/* Similarity meter */
|
| 161 |
+
.similarity-meter {
|
| 162 |
+
position: relative;
|
| 163 |
+
height: 8px;
|
| 164 |
+
background: rgba(255, 255, 255, 0.1);
|
| 165 |
+
border-radius: 4px;
|
| 166 |
+
overflow: hidden;
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
.similarity-fill {
|
| 170 |
+
height: 100%;
|
| 171 |
+
border-radius: 4px;
|
| 172 |
+
transition: width 1s ease-out;
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
/* Match status indicator */
|
| 176 |
+
.match-indicator {
|
| 177 |
+
animation: pulse 2s ease-in-out infinite;
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
@keyframes pulse {
|
| 181 |
+
0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
|
| 182 |
+
50% { box-shadow: 0 0 0 15px rgba(34, 197, 94, 0); }
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
.no-match-indicator {
|
| 186 |
+
animation: pulse-red 2s ease-in-out infinite;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
@keyframes pulse-red {
|
| 190 |
+
0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
|
| 191 |
+
50% { box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
|
| 192 |
+
}
|
frontend/tailwind.config.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('tailwindcss').Config} */
|
| 2 |
+
export default {
|
| 3 |
+
content: [
|
| 4 |
+
"./index.html",
|
| 5 |
+
"./src/**/*.{js,ts,jsx,tsx}",
|
| 6 |
+
],
|
| 7 |
+
theme: {
|
| 8 |
+
extend: {
|
| 9 |
+
colors: {
|
| 10 |
+
primary: {
|
| 11 |
+
50: '#fef2f2',
|
| 12 |
+
100: '#fee2e2',
|
| 13 |
+
200: '#fecaca',
|
| 14 |
+
300: '#fca5a5',
|
| 15 |
+
400: '#f87171',
|
| 16 |
+
500: '#E53935',
|
| 17 |
+
600: '#D32F2F',
|
| 18 |
+
700: '#C62828',
|
| 19 |
+
800: '#B71C1C',
|
| 20 |
+
900: '#7f1d1d',
|
| 21 |
+
},
|
| 22 |
+
secondary: {
|
| 23 |
+
50: '#fffbeb',
|
| 24 |
+
100: '#fef3c7',
|
| 25 |
+
200: '#fde68a',
|
| 26 |
+
300: '#fcd34d',
|
| 27 |
+
400: '#FFC107',
|
| 28 |
+
500: '#FFB300',
|
| 29 |
+
600: '#F59E0B',
|
| 30 |
+
700: '#D97706',
|
| 31 |
+
800: '#B45309',
|
| 32 |
+
900: '#78350f',
|
| 33 |
+
},
|
| 34 |
+
dark: {
|
| 35 |
+
100: '#1e1e2e',
|
| 36 |
+
200: '#181825',
|
| 37 |
+
300: '#11111b',
|
| 38 |
+
400: '#0a0a0f',
|
| 39 |
+
}
|
| 40 |
+
},
|
| 41 |
+
animation: {
|
| 42 |
+
'pulse-slow': 'pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite',
|
| 43 |
+
'gradient': 'gradient 8s linear infinite',
|
| 44 |
+
'float': 'float 6s ease-in-out infinite',
|
| 45 |
+
},
|
| 46 |
+
keyframes: {
|
| 47 |
+
gradient: {
|
| 48 |
+
'0%, 100%': { backgroundPosition: '0% 50%' },
|
| 49 |
+
'50%': { backgroundPosition: '100% 50%' },
|
| 50 |
+
},
|
| 51 |
+
float: {
|
| 52 |
+
'0%, 100%': { transform: 'translateY(0px)' },
|
| 53 |
+
'50%': { transform: 'translateY(-20px)' },
|
| 54 |
+
}
|
| 55 |
+
},
|
| 56 |
+
backgroundImage: {
|
| 57 |
+
'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
|
| 58 |
+
}
|
| 59 |
+
},
|
| 60 |
+
},
|
| 61 |
+
plugins: [],
|
| 62 |
+
}
|
frontend/vite.config.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { defineConfig } from 'vite'
|
| 2 |
+
import react from '@vitejs/plugin-react'
|
| 3 |
+
|
| 4 |
+
export default defineConfig({
|
| 5 |
+
plugins: [react()],
|
| 6 |
+
build: {
|
| 7 |
+
outDir: '../static',
|
| 8 |
+
emptyOutDir: true
|
| 9 |
+
},
|
| 10 |
+
server: {
|
| 11 |
+
proxy: {
|
| 12 |
+
'/api': 'http://localhost:7860'
|
| 13 |
+
}
|
| 14 |
+
}
|
| 15 |
+
})
|
static/assets/index-DkDtm-x5.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
static/assets/index-IQR6BTDK.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.-bottom-1{bottom:-.25rem}.bottom-0{bottom:0}.left-0{left:0}.left-3{left:.75rem}.right-0{right:0}.right-3{right:.75rem}.top-3{top:.75rem}.z-10{z-index:10}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mt-1{margin-top:.25rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-24{margin-top:6rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-0\.5{height:.125rem}.h-10{height:2.5rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-\[300px\]{height:300px}.h-full{height:100%}.min-h-\[300px\]{min-height:300px}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-10{width:2.5rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.scroll-mt-24{scroll-margin-top:6rem}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.border-green-500\/30{border-color:#22c55e4d}.border-primary-500{--tw-border-opacity: 1;border-color:rgb(229 57 53 / var(--tw-border-opacity, 1))}.border-red-500\/30{border-color:#ef44444d}.bg-black\/50{background-color:#00000080}.bg-dark-200{--tw-bg-opacity: 1;background-color:rgb(24 24 37 / var(--tw-bg-opacity, 1))}.bg-dark-300{--tw-bg-opacity: 1;background-color:rgb(17 17 27 / var(--tw-bg-opacity, 1))}.bg-dark-400{--tw-bg-opacity: 1;background-color:rgb(10 10 15 / var(--tw-bg-opacity, 1))}.bg-gray-700\/50{background-color:#37415180}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/20{background-color:#22c55e33}.bg-primary-500\/10{background-color:#e539351a}.bg-red-500\/10{background-color:#ef44441a}.bg-red-500\/20{background-color:#ef444433}.bg-opacity-20{--tw-bg-opacity: .2}.bg-gradient-radial{background-image:radial-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-black\/80{--tw-gradient-from: rgb(0 0 0 / .8) var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500{--tw-gradient-from: #3b82f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500{--tw-gradient-from: #22c55e var(--tw-gradient-from-position);--tw-gradient-to: rgb(34 197 94 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500\/30{--tw-gradient-from: rgb(34 197 94 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(34 197 94 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-primary-500{--tw-gradient-from: #E53935 var(--tw-gradient-from-position);--tw-gradient-to: rgb(229 57 53 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-primary-500\/20{--tw-gradient-from: rgb(229 57 53 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(229 57 53 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from: #a855f7 var(--tw-gradient-from-position);--tw-gradient-to: rgb(168 85 247 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-500{--tw-gradient-from: #ef4444 var(--tw-gradient-from-position);--tw-gradient-to: rgb(239 68 68 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-500\/30{--tw-gradient-from: rgb(239 68 68 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(239 68 68 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-yellow-500{--tw-gradient-from: #eab308 var(--tw-gradient-from-position);--tw-gradient-to: rgb(234 179 8 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-black\/20{--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(0 0 0 / .2) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-orange-600{--tw-gradient-to: rgb(234 88 12 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #ea580c var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-transparent{--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), transparent var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-cyan-500{--tw-gradient-to: #06b6d4 var(--tw-gradient-to-position)}.to-emerald-400{--tw-gradient-to: #34d399 var(--tw-gradient-to-position)}.to-emerald-500{--tw-gradient-to: #10b981 var(--tw-gradient-to-position)}.to-orange-400{--tw-gradient-to: #fb923c var(--tw-gradient-to-position)}.to-orange-500{--tw-gradient-to: #f97316 var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to: #ec4899 var(--tw-gradient-to-position)}.to-purple-500\/20{--tw-gradient-to: rgb(168 85 247 / .2) var(--tw-gradient-to-position)}.to-rose-500{--tw-gradient-to: #f43f5e var(--tw-gradient-to-position)}.to-secondary-400{--tw-gradient-to: #FFC107 var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.text-center{text-align:center}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-primary-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.mix-blend-lighten{mix-blend-mode:lighten}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-green-500\/50{--tw-shadow-color: rgb(34 197 94 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-primary-500\/25{--tw-shadow-color: rgb(229 57 53 / .25);--tw-shadow: var(--tw-shadow-colored)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-green-500\/50{--tw-ring-color: rgb(34 197 94 / .5)}.ring-red-500\/50{--tw-ring-color: rgb(239 68 68 / .5)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}:root{--gradient-1: #E53935;--gradient-2: #FFC107;--gradient-3: #FF9800}*{margin:0;padding:0;box-sizing:border-box}body{font-family:Inter,sans-serif;background:#0a0a0f;color:#fff;min-height:100vh;overflow-x:hidden}h1,h2,h3,h4,h5,h6{font-family:Space Grotesk,sans-serif}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{background:#1e1e2e}::-webkit-scrollbar-thumb{background:#e53935;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#ef5350}.glass{background:#1e1e2e99;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);border:1px solid rgba(255,255,255,.1)}.glass-card{background:linear-gradient(135deg,#ffffff0d,#ffffff05);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);border:1px solid rgba(255,255,255,.08);border-radius:24px}.gradient-text{background:linear-gradient(135deg,#e53935,#ffc107);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.gradient-border{position:relative;background:#0a0a0f;border-radius:24px}.gradient-border:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:24px;padding:2px;background:linear-gradient(135deg,#e53935,#ffc107,#ff9800);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.bg-animated{background:#0a0a0f}@keyframes ping-slow{75%,to{transform:scale(1.5);opacity:0}}.animate-ping-slow{animation:ping-slow 2s cubic-bezier(0,0,.2,1) infinite}.shimmer{background:linear-gradient(90deg,#fff0,#ffffff0d,#fff0);background-size:200% 100%;animation:shimmer 2s infinite}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.upload-zone{transition:all .3s ease}.upload-zone:hover{border-color:#e5393580;background:#e539350d}.upload-zone.active{border-color:#e53935;background:#e539351a;box-shadow:0 0 40px #e5393533}.result-enter{animation:resultEnter .5s ease-out forwards}@keyframes resultEnter{0%{opacity:0;transform:translateY(20px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}.similarity-meter{position:relative;height:8px;background:#ffffff1a;border-radius:4px;overflow:hidden}.similarity-fill{height:100%;border-radius:4px;transition:width 1s ease-out}.match-indicator{animation:pulse 2s ease-in-out infinite}@keyframes pulse{0%,to{box-shadow:0 0 #22c55e66}50%{box-shadow:0 0 0 15px #22c55e00}}.no-match-indicator{animation:pulse-red 2s ease-in-out infinite}@keyframes pulse-red{0%,to{box-shadow:0 0 #ef444466}50%{box-shadow:0 0 0 15px #ef444400}}.hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.hover\:border-primary-500\/30:hover{border-color:#e539354d}.hover\:border-primary-500\/50:hover{border-color:#e5393580}.hover\:bg-gray-800\/50:hover{background-color:#1f293780}.hover\:bg-red-500\/80:hover{background-color:#ef4444cc}.hover\:text-primary-300:hover{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-primary-500\/30:hover{--tw-shadow-color: rgb(229 57 53 / .3);--tw-shadow: var(--tw-shadow-colored)}.hover\:shadow-primary-500\/40:hover{--tw-shadow-color: rgb(229 57 53 / .4);--tw-shadow: var(--tw-shadow-colored)}.group:hover .group-hover\:w-full{width:100%}.group:hover .group-hover\:scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:text-primary-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:opacity-100{opacity:1}@media (min-width: 640px){.sm\:flex-row{flex-direction:row}}@media (min-width: 768px){.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-32{height:8rem}.md\:w-32{width:8rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:p-12{padding:3rem}.md\:p-8{padding:2rem}.md\:text-5xl{font-size:3rem;line-height:1}.md\:text-7xl{font-size:4.5rem;line-height:1}}@media (min-width: 1024px){.lg\:w-1\/2{width:50%}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}}
|
static/favicon.svg
ADDED
|
|
static/index.html
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
+
<title>Seventh Sense AI - Face Recognition</title>
|
| 8 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 9 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 10 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap" rel="stylesheet">
|
| 11 |
+
<script type="module" crossorigin src="/assets/index-DkDtm-x5.js"></script>
|
| 12 |
+
<link rel="stylesheet" crossorigin href="/assets/index-IQR6BTDK.css">
|
| 13 |
+
</head>
|
| 14 |
+
<body>
|
| 15 |
+
<div id="root"></div>
|
| 16 |
+
</body>
|
| 17 |
+
</html>
|
static/logo.png
ADDED
|
static/seventhsense-logo.png
ADDED
|