Spaces:
Sleeping
Sleeping
File size: 1,149 Bytes
f3e324b 40da053 d2dff7d 40da053 f3e324b c18ab11 f3e324b 7d54600 f3e324b 40da053 d2dff7d f3e324b f4ce1f0 3df055c f3e324b 053e473 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
from read_whole_sliding_images import *
from stain_normalization import *
import gradio as gr
wsi2png = gr.Interface(fn=wsi2png, inputs=gr.File(), outputs=gr.Image(type='numpy'),
examples=wsi2png_examples)
bound_png = gr.Interface(fn=read_bounds_of_image, inputs=gr.Image(type='numpy'),
outputs=gr.Image(type='numpy'), examples=read_bounds_examples)
inp1 = gr.File()
inp2 = gr.Slider(1, 10, 4, step=0.25, label="Resolution")
# mask_wsi = gr.Interface(fn=mask_image, inputs=[inp1, inp2], outputs=gr.Image(type='numpy'), examples=mask_wsi_examples)
normalize_wsi = gr.Interface(fn=normalize_stain, inputs=gr.File(), outputs=gr.Image(type='numpy'),
examples=stain_normalization_wsi_examples)
# demo = gr.TabbedInterface([wsi2png, bound_png, mask_wsi, normalize_wsi], ["WSI2PNG", "Bound Image", "Mask WSI", "Normalize Stain"])
demo = gr.TabbedInterface([wsi2png, bound_png, normalize_wsi], ["WSI2PNG", "Bound Image",
"Normalize Stain"])
if __name__ == "__main__":
demo.launch(show_api=True) |