Spaces:
Sleeping
Sleeping
muhammadhamza-stack commited on
Commit ·
8784ab7
1
Parent(s): d49a4fc
update app
Browse files
app.py
CHANGED
|
@@ -70,7 +70,7 @@ def segment_image(input_image):
|
|
| 70 |
# --------------------
|
| 71 |
# UI
|
| 72 |
# --------------------
|
| 73 |
-
with gr.Blocks(title="
|
| 74 |
gr.Markdown("<h1 style='text-align:center; background:linear-gradient(90deg,#4facfe,#00f2fe); color:white; padding:10px;'>HemaScan Pro - Binary Segmentation</h1>")
|
| 75 |
|
| 76 |
with gr.Accordion(" Documentation", open=False):
|
|
@@ -80,22 +80,25 @@ with gr.Blocks(title="HemaScan Pro") as demo:
|
|
| 80 |
gr.Markdown("---")
|
| 81 |
gr.Markdown(OUTPUT_EXPLANATION)
|
| 82 |
|
| 83 |
-
gr.Markdown("## Step 1: Upload Blood Smear Image")
|
| 84 |
with gr.Row():
|
|
|
|
| 85 |
with gr.Column(scale=1):
|
| 86 |
# Define Input component directly inside the column (No .render() needed)
|
| 87 |
input_image = gr.Image(type="pil", label="Step 1: Upload Blood Smear Image", width=600, height=600)
|
| 88 |
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
|
|
|
| 96 |
|
|
|
|
|
|
|
| 97 |
gr.Examples(
|
| 98 |
-
examples=["data/1.
|
| 99 |
inputs=input_image,
|
| 100 |
outputs=output_image,
|
| 101 |
fn=segment_image,
|
|
|
|
| 70 |
# --------------------
|
| 71 |
# UI
|
| 72 |
# --------------------
|
| 73 |
+
with gr.Blocks(title="Malaria Cell Segmentation Tool") as demo:
|
| 74 |
gr.Markdown("<h1 style='text-align:center; background:linear-gradient(90deg,#4facfe,#00f2fe); color:white; padding:10px;'>HemaScan Pro - Binary Segmentation</h1>")
|
| 75 |
|
| 76 |
with gr.Accordion(" Documentation", open=False):
|
|
|
|
| 80 |
gr.Markdown("---")
|
| 81 |
gr.Markdown(OUTPUT_EXPLANATION)
|
| 82 |
|
|
|
|
| 83 |
with gr.Row():
|
| 84 |
+
gr.Markdown("## Step 1: Upload Blood Smear Image")
|
| 85 |
with gr.Column(scale=1):
|
| 86 |
# Define Input component directly inside the column (No .render() needed)
|
| 87 |
input_image = gr.Image(type="pil", label="Step 1: Upload Blood Smear Image", width=600, height=600)
|
| 88 |
|
| 89 |
+
gr.Markdown("## Step 2: Click Submit for Segmentation")
|
| 90 |
+
with gr.Row():
|
| 91 |
+
submit_button = gr.Button("Submit for Segmentation", variant="primary")
|
| 92 |
+
gr.Markdown("## Output")
|
| 93 |
+
with gr.Column(scale=1):
|
| 94 |
+
# Define Output component directly inside the column (No .render() needed)
|
| 95 |
+
output_image = gr.Image(type="pil", label="Step 3: Predicted Masks", width=600, height=600)
|
| 96 |
+
|
| 97 |
|
| 98 |
+
gr.markdown("---")
|
| 99 |
+
gr.markdown("## Example Images")
|
| 100 |
gr.Examples(
|
| 101 |
+
examples=["data/1.png", "data/2.png", "data/3.png"],
|
| 102 |
inputs=input_image,
|
| 103 |
outputs=output_image,
|
| 104 |
fn=segment_image,
|