Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,9 +22,22 @@ def getResult(inp):
|
|
| 22 |
return "Yes Brain Tumor"
|
| 23 |
|
| 24 |
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
if __name__ == "__main__":
|
| 30 |
iface.launch()
|
|
|
|
| 22 |
return "Yes Brain Tumor"
|
| 23 |
|
| 24 |
|
| 25 |
+
|
| 26 |
+
examples = [
|
| 27 |
+
["example_images/no_tumor_1.jpg"],
|
| 28 |
+
["example_images/no_tumor_2.jpg"],
|
| 29 |
+
["example_images/tumor_1.jpg"],
|
| 30 |
+
["example_images/tumor_2.jpg"]
|
| 31 |
+
]
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
iface = gr.Interface(
|
| 35 |
+
fn=getResult,
|
| 36 |
+
inputs=gr.Image(shape=(64, 64)),
|
| 37 |
+
outputs=gr.Label(num_top_classes=2),
|
| 38 |
+
title="Brain Tumor Classification",
|
| 39 |
+
description="Upload the MRI Image of the Brain and it will tell whether it has a Brain Tumor or not",
|
| 40 |
+
examples=examples
|
| 41 |
+
)
|
| 42 |
if __name__ == "__main__":
|
| 43 |
iface.launch()
|