awacke1 commited on
Commit
738fdc5
β€’
1 Parent(s): 0cd6399

Create new file

Browse files
Files changed (1) hide show
  1. app.py +27 -0
app.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import time
2
+ import gradio as gr
3
+ import os
4
+
5
+
6
+ def load_mesh(mesh_file_name):
7
+ return mesh_file_name, mesh_file_name
8
+
9
+
10
+ demo = gr.Interface(
11
+ fn=load_mesh,
12
+ inputs=gr.Model3D(),
13
+ outputs=[
14
+ gr.Model3D(
15
+ clear_color=[0.0, 0.0, 0.0, 0.0], label="3D Model"),
16
+ gr.File(label="Download 3D Model")
17
+ ],
18
+ examples=[
19
+ [os.path.join(os.path.dirname(__file__), "files/Bunny.obj")],
20
+ [os.path.join(os.path.dirname(__file__), "files/Duck.glb")],
21
+ [os.path.join(os.path.dirname(__file__), "files/Fox.gltf")],
22
+ [os.path.join(os.path.dirname(__file__), "files/face.obj")],
23
+ ],
24
+ )
25
+
26
+ if __name__ == "__main__":
27
+ demo.launch()