Spaces:
Sleeping
Sleeping
first commit
Browse files- 0.jpeg +0 -0
- 2.jpeg +0 -0
- 4.jpeg +0 -0
- app.py +17 -0
- requirements.txt +1 -0
- resnet_finetuned.pkl +3 -0
0.jpeg
ADDED
|
2.jpeg
ADDED
|
4.jpeg
ADDED
|
app.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from fastai.vision.all import *
|
| 3 |
+
learn=load_learner("resnet_finetuned.pkl")
|
| 4 |
+
|
| 5 |
+
def classify_images(im):
|
| 6 |
+
pred,idx,probs=learn.predict(im)
|
| 7 |
+
s='Your submitted case has Prostate cancer of IUPC Grade '+pred
|
| 8 |
+
return s
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
img=gr.Image(shape=(512,512),source="upload")
|
| 13 |
+
label=gr.Label()
|
| 14 |
+
examples=["0.jpeg","2.jpeg","4.jpeg"]
|
| 15 |
+
|
| 16 |
+
intf=gr.Interface(title="PCa Detection ProtoType",description="This is Protorype for our model presiction",fn=classify_images,inputs=img,outputs=label,examples=examples)
|
| 17 |
+
intf.launch(inline=False)
|
requirements.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
fastai
|
resnet_finetuned.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:89323337f698a49b6f9088550e64caf1da15322d46796032ef1c08c8dad238ad
|
| 3 |
+
size 102989965
|