Spaces:
Running
Running
Create run.py
Browse files
run.py
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import os
|
3 |
+
|
4 |
+
|
5 |
+
def load_mesh(mesh_file_name):
|
6 |
+
return mesh_file_name
|
7 |
+
|
8 |
+
|
9 |
+
demo = gr.Interface(
|
10 |
+
fn=load_mesh,
|
11 |
+
inputs=gr.Model3D(),
|
12 |
+
outputs=gr.Model3D(
|
13 |
+
clear_color=[0.0, 0.0, 0.0, 0.0], label="3D Model"),
|
14 |
+
examples=[
|
15 |
+
[os.path.join(os.path.dirname(__file__), "files/model1.glb")],
|
16 |
+
[os.path.join(os.path.dirname(__file__), "files/model2.glb")],
|
17 |
+
[os.path.join(os.path.dirname(__file__), "files/model3.glb")],
|
18 |
+
[os.path.join(os.path.dirname(__file__), "files/model4.glb")],
|
19 |
+
],
|
20 |
+
)
|
21 |
+
|
22 |
+
if __name__ == "__main__":
|
23 |
+
demo.launch()
|