Spaces:
Runtime error
Runtime error
Create new file
Browse files
app.py
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import time
|
2 |
+
import gradio as gr
|
3 |
+
import os
|
4 |
+
|
5 |
+
def load_mesh(mesh_file_name):
|
6 |
+
return mesh_file_name, mesh_file_name
|
7 |
+
|
8 |
+
demo = gr.Interface(
|
9 |
+
fn=load_mesh,
|
10 |
+
inputs=gr.Model3D(),
|
11 |
+
outputs=[
|
12 |
+
gr.Model3D(
|
13 |
+
clear_color=[0.0, 0.0, 0.0, 0.0], label="3D Model"),
|
14 |
+
gr.File(label="Download 3D Model")
|
15 |
+
],
|
16 |
+
examples=[
|
17 |
+
[os.path.join(os.path.dirname(__file__), "files/Duck.glb")],
|
18 |
+
[os.path.join(os.path.dirname(__file__), "files/rubber_duck.glb")],
|
19 |
+
[os.path.join(os.path.dirname(__file__), "files/Wolf-Blender-2.82a.glb")]
|
20 |
+
],
|
21 |
+
)
|
22 |
+
|
23 |
+
if __name__ == "__main__":
|
24 |
+
demo.launch()
|