MUmairAB commited on
Commit
c29c4af
1 Parent(s): 52512b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -3
app.py CHANGED
@@ -21,9 +21,19 @@ def detect_cancer(img):
21
  else:
22
  return("Unfortunately! you have breast cancer. Kindly consult a doctor!")
23
 
 
 
 
 
24
 
25
- gr.Interface(title="Breast Cancer Diagnosis\n(by Umair Akram)",
 
26
  description="Enter the Histopathological image of the breast to predict the diagnosis.",
27
  fn=detect_cancer,
28
- inputs=gr.Image(shape=(50, 50)),
29
- outputs='text').launch()
 
 
 
 
 
 
21
  else:
22
  return("Unfortunately! you have breast cancer. Kindly consult a doctor!")
23
 
24
+ #Define Gradio input components for reading image
25
+ input_img = gr.Image(shape=(50, 50))
26
+ #Define Gradio output component
27
+ output = 'text'
28
 
29
+ #Create a Gradio user interface
30
+ interfac = gr.Interface(title="Breast Cancer Diagnosis\n(by Umair Akram)",
31
  description="Enter the Histopathological image of the breast to predict the diagnosis.",
32
  fn=detect_cancer,
33
+ inputs=input_img,
34
+ outputs=output)
35
+
36
+ #Define the main function
37
+ if __name__ == "__main__":
38
+ #Launch the Gradio interface
39
+ interfac.launch()