Download app.py from WACATW/3d: direct link, hf CLI and curl.
- Browser
- Download file 364 Bytes
-
https://huggingface.co/spaces/WACATW/3d/resolve/main/app.py
- Command line
-
hf download hf://spaces/WACATW/3d/app.py
-
curl -L -o app.py https://huggingface.co/spaces/WACATW/3d/resolve/main/app.py
364 Bytes
| import gradio as gr | |
| import trimesh | |
| import tempfile | |
| def load_and_show_3d(model_file): | |
| # 后端加载校验模型,前端Three.js渲染 | |
| mesh = trimesh.load(model_file) | |
| return model_file | |
| demo = gr.Interface( | |
| fn=load_and_show_3d, | |
| inputs=gr.Model3D(label="上传GLB/PLY模型"), | |
| outputs=gr.Model3D(label="实时渲染预览"), | |
| ) | |
| demo.launch() |