DLBot commited on
Commit
83b6e28
·
verified ·
1 Parent(s): 8d27c90
Files changed (1) hide show
  1. app.py +17 -0
app.py CHANGED
@@ -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)