Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,25 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
# Assuming no shape needs to be specified directly in the constructor
|
| 4 |
+
image = gr.Image()
|
| 5 |
+
label = gr.Label()
|
| 6 |
+
examples = [
|
| 7 |
+
'/kaggle/input/leukemia-cells/allbloodsmear.jpg',
|
| 8 |
+
'/kaggle/input/cells-of-sickle/650x450-Sickle-Cell-Trait.jpg',
|
| 9 |
+
'/kaggle/input/cells-of-sickle/Sickle Cell Anemia smear 40x.jpg',
|
| 10 |
+
'/kaggle/input/healthy-cells/normalbloodsmear.jpg'
|
| 11 |
+
]
|
| 12 |
|
| 13 |
+
intf = gr.Interface(
|
| 14 |
+
fn=classify_image,
|
| 15 |
+
inputs=image,
|
| 16 |
+
outputs=label,
|
| 17 |
+
examples=examples,
|
| 18 |
+
title='Blood Disease Identifier',
|
| 19 |
+
description="Please upload your blood smear image that is greater than 200x magnification to diagnose the patient with the following blood diseases: Sickle Cell Disease, Leukemia, or Thalassemia. <br><br>Please note that the results are not 100% accurate and should only be used as a first means of detection. Please contact a medical professional for more information and possible future action. CellXpert are not liable for any misdiagnosis that may occur.",
|
| 20 |
+
allow_flagging=False,
|
| 21 |
+
article='Sickle cell disease (SCD) is a group of inherited red blood cell disorders. In SCD, the red blood cells become hard and sticky and look like a C-shaped farm tool called a “sickle.” The disease can be managed under proper medical supervision.'
|
| 22 |
+
)
|
| 23 |
+
|
| 24 |
+
# Launch the interface
|
| 25 |
+
intf.launch(inline=False)
|