--- title: SMART POLDER-S3 Inference emoji: 🏆 colorFrom: blue colorTo: blue sdk: gradio sdk_version: 6.32.0 python_version: "3.12" app_file: app.py pinned: false --- # Hugging Face image inference service This Gradio Space provides a browser test interface and the Gradio API for the ESP32. The device uploads a JPEG to `/gradio_api/upload`, starts inference with `POST /gradio_api/call/v2/classify`, then reads the server-sent result from `GET /gradio_api/call/classify/{event_id}`. It runs the MobileNetV3-small classifier trained by `../Training/train.py` with Gradio as the only web framework. The `spaces` helper is used only to request the configured ZeroGPU (RTX 6000) for inference. ## Prepare model files Copy the training output into `model/`: ```text model/ model.pt classes.json ``` The model files are intentionally not included in source control. Create a Gradio Space on Hugging Face and upload this folder's files plus `model/`. ## Configure and test Use the Gradio image upload interface to test predictions. Its result has this shape: ```json {"label":"clear","confidence":0.97,"ai_trash_detected":false} ``` The browser UI is Gradio. ZeroGPU requires the `spaces.GPU` function decorator; it is not a second web framework.