Spaces:
Sleeping
Sleeping
File size: 478 Bytes
3e9df0c ca0eb10 3e9df0c ca0eb10 3e9df0c ca0eb10 3e9df0c ca0eb10 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import gradio as gr
import os
def load_mesh(mesh_file_name):
if os.path.exists(mesh_file_name):
return mesh_file_name
return None
demo = gr.Interface(
fn=load_mesh,
inputs=gr.Model3D(),
outputs=gr.Model3D(clear_color=[0.0, 0.0, 0.0, 0.0], label="3D Model"),
examples=[
["files/model1.glb"],
["files/model2.glb"],
["files/model3.glb"],
["files/model4.glb"],
],
)
if __name__ == "__main__":
demo.launch()
|