Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
26 |
description="Enter the Histopathological image of the breast to predict the diagnosis.",
|
27 |
fn=detect_cancer,
|
28 |
-
inputs=
|
29 |
-
outputs=
|
|
|
|
|
|
|
|
|
|
|
|
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()
|