Update app.py
Browse files
app.py
CHANGED
|
@@ -187,16 +187,20 @@ with gr.Blocks(title="Teeth Segmentation — Mask R-CNN") as demo:
|
|
| 187 |
"The model will overlay colored masks on detected teeth."
|
| 188 |
)
|
| 189 |
|
| 190 |
-
with gr.
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
examples=[
|
| 194 |
-
["example_image1.jfif"],
|
| 195 |
-
["example_image2.jfif"],
|
| 196 |
-
["example_image3.jfif"],
|
| 197 |
-
])
|
| 198 |
-
analyze_btn = gr.Button("Analyze Image", variant="primary")
|
| 199 |
output_image = gr.Image(label="Segmented Output", type="pil")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 200 |
|
| 201 |
analyze_btn.click(
|
| 202 |
fn=run_inference,
|
|
|
|
| 187 |
"The model will overlay colored masks on detected teeth."
|
| 188 |
)
|
| 189 |
|
| 190 |
+
with gr.Column():
|
| 191 |
+
input_image = gr.Image(label="Input Image", type="pil")
|
| 192 |
+
analyze_btn = gr.Button("Analyze Image", variant="primary")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
output_image = gr.Image(label="Segmented Output", type="pil")
|
| 194 |
+
|
| 195 |
+
gr.Examples(
|
| 196 |
+
examples=[
|
| 197 |
+
["example_image1.jfif"],
|
| 198 |
+
["example_image2.jfif"],
|
| 199 |
+
["example_image3.jfif"],
|
| 200 |
+
],
|
| 201 |
+
inputs=input_image,
|
| 202 |
+
)
|
| 203 |
+
|
| 204 |
|
| 205 |
analyze_btn.click(
|
| 206 |
fn=run_inference,
|