Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -57,19 +57,16 @@ def predict(image):
|
|
| 57 |
return mask_final
|
| 58 |
|
| 59 |
# إنشاء واجهة Gradio
|
| 60 |
-
with gr.Blocks() as iface:
|
| 61 |
-
gr.Markdown("# Tooth Segmentation Model")
|
| 62 |
-
gr.Markdown("Upload a dental X-ray image to generate the annotation mask.")
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
output_image = gr.File(label="Annotation Mask")
|
| 71 |
-
|
| 72 |
submit_button.click(fn=predict, inputs=input_image, outputs=output_image)
|
| 73 |
-
|
| 74 |
if __name__ == "__main__":
|
| 75 |
iface.launch()
|
|
|
|
| 57 |
return mask_final
|
| 58 |
|
| 59 |
# إنشاء واجهة Gradio
|
| 60 |
+
with gr.Blocks() as iface:
|
| 61 |
+
gr.Markdown("# Tooth Segmentation Model")
|
| 62 |
+
gr.Markdown("Upload a dental X-ray image to generate the annotation mask.")
|
| 63 |
+
with gr.Row():
|
| 64 |
+
with gr.Column():
|
| 65 |
+
input_image = gr.Image(label="Input X-ray Image", type="numpy")
|
| 66 |
+
submit_button = gr.Button("Predict")
|
| 67 |
+
with gr.Column():
|
| 68 |
+
output_image = gr.Image(label="Annotation Mask", type="numpy")
|
| 69 |
+
|
|
|
|
|
|
|
| 70 |
submit_button.click(fn=predict, inputs=input_image, outputs=output_image)
|
|
|
|
| 71 |
if __name__ == "__main__":
|
| 72 |
iface.launch()
|