Spaces:
Runtime error
Runtime error
File size: 559 Bytes
9cbbb9b 460fece 9cbbb9b 460fece 9cbbb9b 460fece 9cbbb9b 460fece |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import gradio as gr
import nibabel as nib # For handling .nii or .nii.gz files
import os
def convert_and_load_mesh(nii_file_path):
# Assume convert_to_obj is a function that converts .nii/.nii.gz to .obj
obj_file_path = convert_to_obj(nii_file_path)
return obj_file_path
def convert_to_obj(nii_file_path):
# Conversion logic here
pass
demo = gr.Interface(
fn=convert_and_load_mesh,
inputs=gr.Model3D(),
outputs=gr.Model3D(clear_color=[0.0, 0.0, 0.0, 0.0], label="3D Model"),
)
if __name__ == "__main__":
demo.launch()
|