File size: 566 Bytes
ac11083 9ac8bcb ac11083 68aa446 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
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, max_threads=30)
|