ptschandl commited on
Commit
60c1b24
1 Parent(s): 1f4879c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
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.inputs.Image(label="Upload a dermatoscopic image", type="filepath"),
 
76
  outputs=gr.outputs.Label(num_top_classes=len(args.get("dxlabels"))),
77
- title="Dermatoscopic evaluation",
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()