Saim8250 commited on
Commit
1c885b5
·
1 Parent(s): 1111be4

Upload 7 files

Browse files
Files changed (7) hide show
  1. HAMM1.pkl +3 -0
  2. README.md +4 -4
  3. akiec.jpg +0 -0
  4. app.py +20 -0
  5. mel.jpg +0 -0
  6. requirements.txt +3 -0
  7. vasc.jpg +0 -0
HAMM1.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1f884cd706e2efb3c557119d4d63b26e3766460860f86ae31fa635d0aefb9486
3
+ size 65201629
README.md CHANGED
@@ -1,10 +1,10 @@
1
  ---
2
- title: HAM10000 IMAGE CLASSIFICATION
3
- emoji: 💻
4
- colorFrom: blue
5
  colorTo: blue
6
  sdk: gradio
7
- sdk_version: 4.2.0
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
 
1
  ---
2
+ title: HAMMM
3
+ emoji: 🦀
4
+ colorFrom: yellow
5
  colorTo: blue
6
  sdk: gradio
7
+ sdk_version: 3.3.1
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
akiec.jpg ADDED
app.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !import fastai
2
+ import fastai
3
+ from fastai.vision.all import*
4
+ import gradio as gr
5
+
6
+ def is_cat(x):returnx[0].isupper()
7
+
8
+ learn=load_learner('my_export_HAM10000.pkl')
9
+
10
+ categories=('akiec','bcc','bkl','df','mel','nv','vasc')
11
+
12
+ def classify_img(img):
13
+ pred,idx,probs=learn.predict(img)
14
+ return dict(zip(categories,map(float,probs)))
15
+
16
+ image =gr.inputs.Image(shape=(192,192))
17
+ label =gr.outputs.Label()
18
+ example=['mel.jpg','akiec.jpg','vasc.jpg']
19
+ intf=gr.Interface(fn=classify_img,inputs=image,outputs=label,examples=example)
20
+ intf.launch(inline=False)
mel.jpg ADDED
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ fastai
2
+ gradio
3
+ pathlib
vasc.jpg ADDED