Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
from fastai.vision.all import *
|
3 |
-
import skimage
|
4 |
|
5 |
learn = load_learner('export.pkl')
|
6 |
labels = learn.dls.vocab
|
@@ -11,13 +10,13 @@ def predict(img):
|
|
11 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
12 |
|
13 |
title = "Breast cancer detection with Deep Transfer Learning(ResNet18)."
|
14 |
-
description = "
|
15 |
-
article = "
|
16 |
examples = ['img1.jpeg', 'img2.jpeg']
|
17 |
|
18 |
iface = gr.Interface(
|
19 |
fn=predict,
|
20 |
-
inputs=gr.Image(),
|
21 |
outputs=gr.Label(num_top_classes=3),
|
22 |
title=title,
|
23 |
description=description,
|
|
|
1 |
import gradio as gr
|
2 |
from fastai.vision.all import *
|
|
|
3 |
|
4 |
learn = load_learner('export.pkl')
|
5 |
labels = learn.dls.vocab
|
|
|
10 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
11 |
|
12 |
title = "Breast cancer detection with Deep Transfer Learning(ResNet18)."
|
13 |
+
description = "Upload a breast X-ray image to detect potential issues."
|
14 |
+
article = "Web app built and managed by Addai Fosberg"
|
15 |
examples = ['img1.jpeg', 'img2.jpeg']
|
16 |
|
17 |
iface = gr.Interface(
|
18 |
fn=predict,
|
19 |
+
inputs=gr.Image(),
|
20 |
outputs=gr.Label(num_top_classes=3),
|
21 |
title=title,
|
22 |
description=description,
|