Addai commited on
Commit
90532f6
·
verified ·
1 Parent(s): c4ab7e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -1,6 +1,5 @@
1
  import gradio as gr
2
  from fastai.vision.all import *
3
- import skimage
4
 
5
  learn = load_learner('export.pkl')
6
  labels = learn.dls.vocab
@@ -11,13 +10,13 @@ def predict(img):
11
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
12
 
13
  title = "Breast cancer detection with Deep Transfer Learning(ResNet18)."
14
- description = "<p style='text-align: center'><b>As a radiologist or oncologist, it is crucial to know what is wrong with a breast x-ray image.</b><br><b>Upload the breast X-ray image to know what is wrong with a patient's breast with or without implant. This product is from the findings of my (Team) published research paper: <a href='https://iopscience.iop.org/article/10.1088/2057-1976/ad3cdf' target='_blank' style='color: blue;'>read paper</a>. Learn more about me: <a href='https://www.linkedin.com/in/fosberg-addai-53a6991a7/' target='_blank' style='color: blue;'>Fosberg Addai</a></b></p>"
15
- article = "<p style='text-align: center'><b>Web app is built and managed by Addai Fosberg</b></p>"
16
  examples = ['img1.jpeg', 'img2.jpeg']
17
 
18
  iface = gr.Interface(
19
  fn=predict,
20
- inputs=gr.Image(), # Removed the shape parameter
21
  outputs=gr.Label(num_top_classes=3),
22
  title=title,
23
  description=description,
 
1
  import gradio as gr
2
  from fastai.vision.all import *
 
3
 
4
  learn = load_learner('export.pkl')
5
  labels = learn.dls.vocab
 
10
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
11
 
12
  title = "Breast cancer detection with Deep Transfer Learning(ResNet18)."
13
+ description = "Upload a breast X-ray image to detect potential issues."
14
+ article = "Web app built and managed by Addai Fosberg"
15
  examples = ['img1.jpeg', 'img2.jpeg']
16
 
17
  iface = gr.Interface(
18
  fn=predict,
19
+ inputs=gr.Image(),
20
  outputs=gr.Label(num_top_classes=3),
21
  title=title,
22
  description=description,