Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,13 +9,19 @@ def predict(img):
|
|
9 |
img = PILImage.create(img)
|
10 |
pred,pred_idx,probs = learn.predict(img)
|
11 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
gr.Interface(
|
14 |
fn=predict
|
15 |
,inputs=gr.inputs.Image(shape=(512, 512))
|
16 |
,outputs=gr.outputs.Label(num_top_classes=3)
|
17 |
,examples=['img1.jpg','img2.jpg','img3.jpg']
|
18 |
-
).launch(
|
19 |
|
20 |
|
21 |
|
@@ -49,12 +55,6 @@ gr.Interface(
|
|
49 |
# pred,pred_idx,probs = learn.predict(img)
|
50 |
# return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
51 |
|
52 |
-
# title = "Skin Lesion Classifier [RESNET 50]"
|
53 |
-
# description = "A skin lesion classifier trained on the ISIC2019 dataset with fastai. Created as a demo for Gradio and HuggingFace Spaces."
|
54 |
-
# article="<p style='text-align: center'><a href='https://challenge.isic-archive.com/data/' target='_blank'>Link to ISIC Dataset</a></p>"
|
55 |
-
|
56 |
-
# interpretation='default'
|
57 |
-
# enable_queue=True
|
58 |
|
59 |
# examples = ['img1.jpg','img2.jpg','img3.jpg']
|
60 |
|
|
|
9 |
img = PILImage.create(img)
|
10 |
pred,pred_idx,probs = learn.predict(img)
|
11 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
12 |
+
title = "Skin Lesion Classifier [RESNET 50]"
|
13 |
+
description = "A skin lesion classifier trained on the ISIC2019 dataset with fastai. Created as a demo for Gradio and HuggingFace Spaces."
|
14 |
+
article="<p style='text-align: center'><a href='https://challenge.isic-archive.com/data/' target='_blank'>Link to ISIC Dataset</a></p>"
|
15 |
+
interpretation='default'
|
16 |
+
enable_queue=True
|
17 |
+
|
18 |
|
19 |
gr.Interface(
|
20 |
fn=predict
|
21 |
,inputs=gr.inputs.Image(shape=(512, 512))
|
22 |
,outputs=gr.outputs.Label(num_top_classes=3)
|
23 |
,examples=['img1.jpg','img2.jpg','img3.jpg']
|
24 |
+
,title=title,description=description,article=article,examples=['img1.jpg','img2.jpg','img3.jpg'],interpretation=interpretation,enable_queue=enable_queue).launch()
|
25 |
|
26 |
|
27 |
|
|
|
55 |
# pred,pred_idx,probs = learn.predict(img)
|
56 |
# return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
# examples = ['img1.jpg','img2.jpg','img3.jpg']
|
60 |
|