Monius commited on
Commit
ac11083
·
1 Parent(s): b7ae949
Files changed (2) hide show
  1. README.md +9 -4
  2. run.py +20 -0
README.md CHANGED
@@ -1,13 +1,18 @@
1
  ---
2
  title: T3D
3
- emoji: 📊
4
- colorFrom: blue
5
- colorTo: yellow
6
  sdk: gradio
7
  sdk_version: 4.14.0
8
- app_file: app.py
9
  pinned: false
10
  license: mit
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
1
  ---
2
  title: T3D
3
+ emoji: 🦷
4
+ colorFrom: white
5
+ colorTo: red
6
  sdk: gradio
7
  sdk_version: 4.14.0
8
+ app_file: run.py
9
  pinned: false
10
  license: mit
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
14
+
15
+ ```bash
16
+ conda create -n w3 python=3.12 scipy numpy pyglet trimesh gradio -c conda-forge
17
+ argo tunnel --url http://127.0.0.1:7860
18
+ ```
run.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import os
3
+
4
+
5
+ def load_mesh(mesh_file_name):
6
+ return mesh_file_name
7
+
8
+ T3D = gr.Interface(
9
+ fn=load_mesh,
10
+ inputs=gr.File(label="3D Mesh File"),
11
+ outputs=gr.Model3D(clear_color=[0.0, 0.0, 0.0, 0.0], label="3D Model"),
12
+ examples=[
13
+ [os.path.join(os.path.dirname(os.path.dirname(__file__)), "dataset/1/output_0.stl")],
14
+ [os.path.join(os.path.dirname(os.path.dirname(__file__)), "dataset/2/output_0.stl")],
15
+ [os.path.join(os.path.dirname(os.path.dirname(__file__)), "dataset/3/output_0.stl")],
16
+ ],
17
+ cache_examples=True,
18
+ )
19
+
20
+ T3D.launch(share=False)