Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ def predict(image)->dict:
|
|
39 |
aug_combos = [x for x in itertools.product(target_sizes, hflips, rotations, crops)]
|
40 |
|
41 |
# Load image
|
42 |
-
img = Image.open(image)
|
43 |
img = img.convert('RGB')
|
44 |
|
45 |
# Predict with Test-time augmentation
|
@@ -72,10 +72,11 @@ If you have a skin change in question, seek contact to your physician.'''
|
|
72 |
|
73 |
gr.Interface(
|
74 |
predict,
|
75 |
-
inputs=gr.
|
|
|
76 |
outputs=gr.outputs.Label(num_top_classes=len(args.get("dxlabels"))),
|
77 |
-
title="Dermatoscopic
|
78 |
description=description,
|
79 |
allow_flagging="manual",
|
80 |
-
examples=["ISIC_0024306.jpg"]
|
81 |
).launch()
|
|
|
39 |
aug_combos = [x for x in itertools.product(target_sizes, hflips, rotations, crops)]
|
40 |
|
41 |
# Load image
|
42 |
+
# img = Image.open(image)
|
43 |
img = img.convert('RGB')
|
44 |
|
45 |
# Predict with Test-time augmentation
|
|
|
72 |
|
73 |
gr.Interface(
|
74 |
predict,
|
75 |
+
inputs=gr.Image(type="pil"),
|
76 |
+
#inputs=gr.inputs.Image(label="Upload a dermatoscopic image", type="filepath"),
|
77 |
outputs=gr.outputs.Label(num_top_classes=len(args.get("dxlabels"))),
|
78 |
+
title="Dermatoscopic classification",
|
79 |
description=description,
|
80 |
allow_flagging="manual",
|
81 |
+
examples=[os.path.join(os.path.dirname(__file__), "ISIC_0024306.jpg")]
|
82 |
).launch()
|