Spaces:
Runtime error
Runtime error
File size: 530 Bytes
1db037e 2df1cff 1db037e 2df1cff 1db037e c4ee74b 9f1d11b c4ee74b 2df1cff 6cdd153 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import gradio as gr
from inference import make_inference
def monai_inference(input):
data_dict = [{"t2": input.name}]
return make_inference(data_dict)
demo = gr.Interface(
fn=monai_inference,
inputs=gr.File(file_count="single", file_types=[".nii.gz", ".zip"], label=".nii.gz file or .zip file"),
outputs="file",
title="Inference on monai model",
description="You can upload either zip of dicom folder or .nii.gz file. In turn, you can download the mask as .nii.gz file.",
)
demo.queue()
demo.launch() |