YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Flask Web App - Usage Guide

Quick Start

1. Install Dependencies

pip install flask torch torchvision tenseal matplotlib scikit-learn pandas

2. Train the Model (if not already done)

python encrypted_inference.py

This will create classifier_weights.pth needed by the Flask app.

3. Start the Flask Server

python app.py

4. Open in Browser

Navigate to: http://localhost:5000

Features

  • Drag & Drop Upload: Modern UI with drag-and-drop image upload
  • Encrypted Classification: Uses TenSEAL for privacy-preserving inference
  • Real-time Results: See predictions with confidence scores
  • Encryption Visualization: View encrypted logits and inference time

How It Works

  1. User uploads an artwork image
  2. ResNet18 extracts 512 features from the image
  3. Features are encrypted using CKKS homomorphic encryption
  4. Server performs classification on encrypted data
  5. Result is decrypted and displayed to the user

Project Structure

project/
β”œβ”€β”€ app.py                    # Flask backend
β”œβ”€β”€ encrypted_inference.py    # Training script
β”œβ”€β”€ classifier_weights.pth    # Trained model weights
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ index.html           # Upload page
β”‚   └── result.html          # Results page
└── static/
    β”œβ”€β”€ style.css            # Styling
    └── uploads/             # Uploaded images
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support