mathsnap-deblur / README.md
Monishcloud8's picture
Upload 5 files
21f5137 verified
|
Raw History Blame Contribute Delete
941 Bytes
---
title: MathSnap Deblur
emoji: 🔍
colorFrom: green
colorTo: gray
sdk: gradio
sdk_version: 6.31.0
python_version: "3.12"
app_file: app.py
pinned: false
license: mit
---
# MathSnap Deblur
Sharpens blurry photos of printed math pages for the MathSnap app's preview. It runs NAFNet
(GoPro motion-deblur, width 64) on free ZeroGPU hardware, in 384×384 tiles with feathered seams.
- Endpoint: Gradio API `/deblur` taking `[jpeg_base64, key]`. It returns a base64 JPEG of at most 2048 px.
- Only the MathSnap Supabase function knows the key. Set it as the Space secret `DEBLUR_KEY` (32+ characters).
- Images are processed in memory and are never logged or stored.
Model: [NAFNet](https://github.com/megvii-research/NAFNet) by megvii-research (MIT). Weights:
[mlx-community/NAFNet-GoPro-width64](https://huggingface.co/mlx-community/NAFNet-GoPro-width64) (MIT),
pinned to revision `09d01a2c` and checked against their SHA-256 at startup.