hasibzunair commited on
Commit
eee1b26
·
1 Parent(s): 11ca577
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -17,7 +17,7 @@ model = None
17
  model = load_model("MelaNet.h5", compile=False)
18
  model.summary()
19
 
20
- examples = ["benign.jpg", "malignant.jpg"]
21
  labels = ["Benign", "Malignant"]
22
 
23
  # Helpers
@@ -44,10 +44,14 @@ def inference(img):
44
  labels_probs = {labels[i]: float(preds[i]) for i, _ in enumerate(labels)}
45
  return labels_probs
46
 
 
 
 
47
  gr.Interface(
48
  fn=inference,
49
- title="Benign or Malignant",
50
- description = "Predict if this image has benign or malignant symptoms",
 
51
  inputs="image",
52
  outputs="label",
53
  examples=examples,
 
17
  model = load_model("MelaNet.h5", compile=False)
18
  model.summary()
19
 
20
+ examples = ["benign.png", "malignant.png"]
21
  labels = ["Benign", "Malignant"]
22
 
23
  # Helpers
 
44
  labels_probs = {labels[i]: float(preds[i]) for i, _ in enumerate(labels)}
45
  return labels_probs
46
 
47
+
48
+ article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2004.06824' target='_blank'>Melanoma Detection using Adversarial Training and Deep Transfer Learning</a> | <a href='https://github.com/hasibzunair/adversarial-lesions' target='_blank'>Github</a></p>"
49
+
50
  gr.Interface(
51
  fn=inference,
52
+ title="Melanoma Detection Demo",
53
+ description = "This model predicts if the given image has benign or malignant symptoms.To use it, simply upload a skin lesion image, or click one of the examples to load them. Read more at the links below",
54
+ article=article,
55
  inputs="image",
56
  outputs="label",
57
  examples=examples,