Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
from fastai.vision.all import *
|
3 |
import skimage
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
learn = load_learner('export.pkl')
|
6 |
|
@@ -12,9 +17,18 @@ def predict(img):
|
|
12 |
|
13 |
title = "Skin Lesion Classifier [RESNET 50]"
|
14 |
description = "A skin lesion classifier trained on the ISIC2019 dataset with fastai. Created as a demo for Gradio and HuggingFace Spaces."
|
15 |
-
|
16 |
-
examples = ['siamese.jpg']
|
17 |
interpretation='default'
|
18 |
enable_queue=True
|
19 |
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
from fastai.vision.all import *
|
3 |
import skimage
|
4 |
+
#Importing necessary libraries
|
5 |
+
import gradio as gr
|
6 |
+
#import scikit-learn as sklearn
|
7 |
+
from fastai.vision.all import *
|
8 |
+
from sklearn.metrics import roc_auc_score
|
9 |
|
10 |
learn = load_learner('export.pkl')
|
11 |
|
|
|
17 |
|
18 |
title = "Skin Lesion Classifier [RESNET 50]"
|
19 |
description = "A skin lesion classifier trained on the ISIC2019 dataset with fastai. Created as a demo for Gradio and HuggingFace Spaces."
|
20 |
+
|
|
|
21 |
interpretation='default'
|
22 |
enable_queue=True
|
23 |
|
24 |
+
examples = ['img1.jpg','img2.jpg','img3.jpg']
|
25 |
+
|
26 |
+
#Launching the gradio application
|
27 |
+
gr.Interface(fn=predict,inputs=gr.inputs.Image(shape=(224, 224)),
|
28 |
+
outputs=gr.outputs.Label(num_top_classes=1),
|
29 |
+
title=title,
|
30 |
+
description=description,article=article,
|
31 |
+
examples=examples,
|
32 |
+
enable_queue=enable_queue).launch(inline=False)
|
33 |
+
|
34 |
+
#gr.Interface(fn=predict,inputs=gr.inputs.Image(shape=(224, 224)),outputs=gr.outputs.Label(num_top_classes=3),title=title,description=description,article=article,examples=examples,interpretation=interpretation,enable_queue=enable_queue).launch()
|