updated app.py
Browse files
app.py
CHANGED
@@ -84,18 +84,15 @@ if __name__ == "__main__":
|
|
84 |
|
85 |
# with gr.Blocks(title="Medical Image Segmentation") as demo:
|
86 |
# gr.Markdown("""<h1><center>Medical Image Segmentation with UW-Madison GI Tract Dataset</center></h1>""")
|
87 |
-
|
88 |
# with gr.Row():
|
89 |
# img_input = gr.Image(type="pil", height=300, width=300, label="Input image")
|
90 |
# img_output = gr.AnnotatedImage(label="Predictions", height=300, width=300, color_map=class2hexcolor)
|
91 |
|
92 |
# section_btn = gr.Button("Generate Predictions")
|
93 |
-
|
94 |
# section_btn.click(partial(predict, model=model, preprocess_fn=preprocess, device=DEVICE), img_input, img_output)
|
95 |
|
96 |
# images_dir = glob(os.path.join(os.getcwd(), "samples") + os.sep + "*.png")
|
97 |
# examples = [i for i in np.random.choice(images_dir, size=8, replace=False)]
|
98 |
-
|
99 |
# gr.Examples(examples=examples, inputs=img_input, outputs=img_output)
|
100 |
|
101 |
demo.launch()
|
|
|
84 |
|
85 |
# with gr.Blocks(title="Medical Image Segmentation") as demo:
|
86 |
# gr.Markdown("""<h1><center>Medical Image Segmentation with UW-Madison GI Tract Dataset</center></h1>""")
|
|
|
87 |
# with gr.Row():
|
88 |
# img_input = gr.Image(type="pil", height=300, width=300, label="Input image")
|
89 |
# img_output = gr.AnnotatedImage(label="Predictions", height=300, width=300, color_map=class2hexcolor)
|
90 |
|
91 |
# section_btn = gr.Button("Generate Predictions")
|
|
|
92 |
# section_btn.click(partial(predict, model=model, preprocess_fn=preprocess, device=DEVICE), img_input, img_output)
|
93 |
|
94 |
# images_dir = glob(os.path.join(os.getcwd(), "samples") + os.sep + "*.png")
|
95 |
# examples = [i for i in np.random.choice(images_dir, size=8, replace=False)]
|
|
|
96 |
# gr.Examples(examples=examples, inputs=img_input, outputs=img_output)
|
97 |
|
98 |
demo.launch()
|