Commit
·
65d1d2e
1
Parent(s):
ad04ec5
Update app.py
Browse files
app.py
CHANGED
@@ -51,5 +51,10 @@ def predict_segmentation(img):
|
|
51 |
input_image = gr.inputs.Image()
|
52 |
output_image1 = gr.outputs.Image(type='pil')
|
53 |
output_image2 = gr.outputs.Image(type='pil')
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
55 |
app.launch()
|
|
|
51 |
input_image = gr.inputs.Image()
|
52 |
output_image1 = gr.outputs.Image(type='pil')
|
53 |
output_image2 = gr.outputs.Image(type='pil')
|
54 |
+
# Define the example image
|
55 |
+
example_image = './albumentations/original/micrograph20.jpeg'
|
56 |
+
example_input = [example_image]
|
57 |
+
example_output = predict_segmentation(example_image)
|
58 |
+
examples = [(example_input, example_output)]
|
59 |
+
app = gr.Interface(fn=predict_segmentation, inputs=input_image, outputs=[output_image1, output_image2], title='Microstructure Segmentation', description='Segment the input image into grain and background.', examples=examples)
|
60 |
app.launch()
|