Download app.py from rigelbar/tiny-digits: direct link, hf CLI and curl.
- Browser
- Download file 495 Bytes
-
https://huggingface.co/rigelbar/tiny-digits/resolve/main/app.py
- Command line
-
hf download hf://rigelbar/tiny-digits/app.py
-
curl -L -o app.py https://huggingface.co/rigelbar/tiny-digits/resolve/main/app.py
495 Bytes
| import gradio as gr | |
| from inference import predict_from_pil | |
| def infer(img): | |
| return predict_from_pil(img) | |
| demo = gr.Interface( | |
| fn=infer, | |
| inputs=gr.Image(type="pil", label="28x28 grayscale image (any image will be resized)"), | |
| outputs=gr.Label(num_top_classes=3, label="Top-3 predictions"), | |
| title="Tiny Digits (Toy Classifier)", | |
| description="Ultra-small CNN demo for deployment tests. Not trained; for pipeline sanity only." | |
| ) | |
| if __name__ == "__main__": | |
| demo.launch() | |