Spaces:
Build error
Build error
Download app.py from anagh1234/Digit-Recognizer: direct link, hf CLI and curl.
- Browser
- Download file 351 Bytes
-
https://huggingface.co/spaces/anagh1234/Digit-Recognizer/resolve/main/app.py
- Command line
-
hf download hf://spaces/anagh1234/Digit-Recognizer/app.py
-
curl -L -o app.py https://huggingface.co/spaces/anagh1234/Digit-Recognizer/resolve/main/app.py
351 Bytes
| from fastai.vision.all import * | |
| import gradio as gr | |
| learn = load_learner('digit-learner.pkl') | |
| def predict_image(image): | |
| pred, _,a = learn.predict(image) | |
| return f"Predicted Class: {pred}" | |
| # Gradio interface definition | |
| interface = gr.Interface(predict_image,inputs="image",outputs="label") | |
| # Launch the interface | |
| interface.launch(share='True') |