import gradio as gr | |
import os | |
def load_mesh(mesh_file_name): | |
return mesh_file_name | |
T3D = gr.Interface( | |
fn=load_mesh, | |
inputs=gr.File(label="3D Mesh File"), | |
outputs=gr.Model3D(clear_color=[0.0, 0.0, 0.0, 0.0], label="3D Model"), | |
examples=[ | |
[os.path.join(os.path.dirname(__file__), "dataset/1/output_0.stl")], | |
[os.path.join(os.path.dirname(__file__), "dataset/2/output_0.stl")], | |
[os.path.join(os.path.dirname(__file__), "dataset/3/output_0.stl")], | |
], | |
cache_examples=True, | |
) | |
T3D.launch(share=False) | |