Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available: 6.23.1
metadata
title: MicroGhost Thermal Inference
emoji: 🔥
colorFrom: green
colorTo: blue
sdk: gradio
sdk_version: 5.49.1
app_file: app.py
pinned: false
license: mit
MicroGhost Thermal Inference Space
This is the free Hugging Face Gradio Space backend for MicroGhost.
It gives you:
- A small Gradio UI at
/ui GET /healthPOST /analyzefor the Vercel frontend
POST /analyze accepts multipart form uploads:
thermal_image: optional thermal image filergb_image: optional RGB image fileconf_thresh: optional float confidence thresholdlap_thresh: optional float Laplacian texture threshold, default80lap_bypass_conf: optional float confidence value that bypasses the Laplacian gate
At least one of thermal_image or rgb_image is required. If only one image is provided, the missing modality is replaced with a blank branch, matching the local thermal-only workflow.
Hugging Face Deployment
Create a new Hugging Face Space with:
SDK: Gradio
Hardware: CPU Basic
Visibility: Public
Then upload the contents of this backend/model folder to that Space.
The checkpoint expected by default is:
checkpoints/best_microghost_thermal_v3.pth
If you rename or move it, set this Space variable:
MODEL_PATH=/home/user/app/checkpoints/your_model_file.pth
For a public Vercel app, optional stricter CORS:
CORS_ORIGINS=https://your-vercel-domain.vercel.app
For local frontend testing:
CORS_ORIGINS=http://localhost:3000