Spaces:
Build error
Build error
Download app.py from DLBot/PCaClassifier: direct link, hf CLI and curl.
- Browser
- Download file 539 Bytes
-
https://huggingface.co/spaces/DLBot/PCaClassifier/resolve/8c2dbd1d05d2bffdd576171fb4e16634d284b283/app.py
- Command line
-
hf download hf://spaces/DLBot/PCaClassifier@8c2dbd1d05d2bffdd576171fb4e16634d284b283/app.py
-
curl -L -o app.py https://huggingface.co/spaces/DLBot/PCaClassifier/resolve/8c2dbd1d05d2bffdd576171fb4e16634d284b283/app.py
539 Bytes
| import gradio as gr | |
| from fastai.vision.all import * | |
| learn=load_learner("resnet_finetuned.pkl") | |
| def classify_images(im): | |
| pred,idx,probs=learn.predict(im) | |
| s='Your submitted case has Prostate cancer of IUPC Grade '+pred | |
| return s | |
| img=gr.Image(shape=(512,512),source="upload") | |
| label=gr.Label() | |
| examples=["0.jpeg","2.jpeg","4.jpeg"] | |
| intf=gr.Interface(title="PCa Detection ProtoType",description="This is Protorype for our model presiction",fn=classify_images,inputs=img,outputs=label,examples=examples) | |
| intf.launch(inline=False) |