text2room / app.py
Mattia2700's picture
feat: add 3d mesh + load meshes
83464bc
raw
history blame
587 Bytes
import os
import gradio as gr
def load_mesh(mesh_file_name):
return mesh_file_name
iface = 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=[
[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")],
],
)
if __name__ == "__main__":
iface.launch()