Spaces:
Running
Running
env fix
Browse files- Dockerfile +1 -0
- install.py +0 -21
- launch.py +2 -9
Dockerfile
CHANGED
@@ -8,6 +8,7 @@ RUN pip3 install --no-cache-dir \
|
|
8 |
numpy \
|
9 |
trimesh \
|
10 |
Pillow \
|
|
|
11 |
gradio==4.40.0
|
12 |
|
13 |
# Set up a new user named "user" with user ID 1000
|
|
|
8 |
numpy \
|
9 |
trimesh \
|
10 |
Pillow \
|
11 |
+
bpy \
|
12 |
gradio==4.40.0
|
13 |
|
14 |
# Set up a new user named "user" with user ID 1000
|
install.py
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
import os
|
2 |
-
import sys
|
3 |
-
import json
|
4 |
-
import uuid
|
5 |
-
import numpy as np
|
6 |
-
import gradio as gr
|
7 |
-
import trimesh
|
8 |
-
import zipfile
|
9 |
-
import subprocess
|
10 |
-
from datetime import datetime
|
11 |
-
from functools import partial
|
12 |
-
from PIL import Image, ImageChops
|
13 |
-
from huggingface_hub import snapshot_download
|
14 |
-
|
15 |
-
|
16 |
-
is_local_run = os.path.exists("../SpaRP_API")
|
17 |
-
code_dir = snapshot_download("sudo-ai/SpaRP_API", token=os.environ['HF_TOKEN']) if not is_local_run else "../SpaRP_API"
|
18 |
-
|
19 |
-
os.system(f"pip install {code_dir}/gradio_model3dcolor-0.0.1-py3-none-any.whl")
|
20 |
-
os.system(f"pip install {code_dir}/gradio_model3dnormal-0.0.1-py3-none-any.whl")
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
launch.py
CHANGED
@@ -1,6 +1,4 @@
|
|
1 |
import os
|
2 |
-
# os.system(f"pip install gradio_model3dcolor-0.0.1-py3-none-any.whl")
|
3 |
-
# os.system(f"pip install gradio_model3dnormal-0.0.1-py3-none-any.whl")
|
4 |
import sys
|
5 |
import json
|
6 |
import uuid
|
@@ -14,16 +12,11 @@ from functools import partial
|
|
14 |
from PIL import Image, ImageChops
|
15 |
from huggingface_hub import snapshot_download
|
16 |
|
17 |
-
|
18 |
-
is_local_run = os.path.exists("../SpaRP_API")
|
19 |
-
code_dir = snapshot_download("sudo-ai/SpaRP_API", token=os.environ['HF_TOKEN']) if not is_local_run else "../SpaRP_API"
|
20 |
-
|
21 |
-
# os.system(f"pip install {code_dir}/gradio_model3dcolor-0.0.1-py3-none-any.whl")
|
22 |
-
# os.system(f"pip install {code_dir}/gradio_model3dnormal-0.0.1-py3-none-any.whl")
|
23 |
-
|
24 |
from gradio_model3dcolor import Model3DColor
|
25 |
from gradio_model3dnormal import Model3DNormal
|
26 |
|
|
|
|
|
27 |
|
28 |
if not is_local_run:
|
29 |
zip_file_path = f'{code_dir}/examples.zip'
|
|
|
1 |
import os
|
|
|
|
|
2 |
import sys
|
3 |
import json
|
4 |
import uuid
|
|
|
12 |
from PIL import Image, ImageChops
|
13 |
from huggingface_hub import snapshot_download
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
from gradio_model3dcolor import Model3DColor
|
16 |
from gradio_model3dnormal import Model3DNormal
|
17 |
|
18 |
+
is_local_run = os.path.exists("../SpaRP_API")
|
19 |
+
code_dir = snapshot_download("sudo-ai/SpaRP_API", token=os.environ['HF_TOKEN']) if not is_local_run else "../SpaRP_API"
|
20 |
|
21 |
if not is_local_run:
|
22 |
zip_file_path = f'{code_dir}/examples.zip'
|