mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-15 02:11:15 +08:00
9b42ba8f10
* changes * changes * revert changes * changes * add changeset * notebooks script * changes * changes --------- Co-authored-by: Ali Abid <aliabid94@gmail.com> Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
26 lines
902 B
Python
26 lines
902 B
Python
import gradio as gr
|
|
import os
|
|
|
|
def load_mesh(mesh_file_name):
|
|
return mesh_file_name
|
|
|
|
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", display_mode="wireframe"),
|
|
examples=[
|
|
[os.path.join(os.path.dirname(__file__), "files/Bunny.obj")],
|
|
[os.path.join(os.path.dirname(__file__), "files/Duck.glb")],
|
|
[os.path.join(os.path.dirname(__file__), "files/Fox.gltf")],
|
|
[os.path.join(os.path.dirname(__file__), "files/face.obj")],
|
|
[os.path.join(os.path.dirname(__file__), "files/sofia.stl")],
|
|
["https://huggingface.co/datasets/dylanebert/3dgs/resolve/main/bonsai/bonsai-7k-mini.splat"],
|
|
["https://huggingface.co/datasets/dylanebert/3dgs/resolve/main/luigi/luigi.ply"],
|
|
],
|
|
cache_examples=True
|
|
)
|
|
|
|
if __name__ == "__main__":
|
|
demo.launch()
|