Spaces:
Running
on
Zero
Running
on
Zero
Update hg_app.py
#36
by
Osama224422
- opened
hg_app.py
CHANGED
|
@@ -11,27 +11,26 @@ print(f"Running on {'local' if args.local else 'huggingface'}")
|
|
| 11 |
if not args.local:
|
| 12 |
import os
|
| 13 |
import spaces
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
print('install custom')
|
| 21 |
-
subprocess.run(shlex.split("pip install custom_rasterizer-0.1-cp310-cp310-linux_x86_64.whl"), check=True)
|
| 22 |
-
|
| 23 |
IP = "0.0.0.0"
|
| 24 |
PORT = 7860
|
| 25 |
|
| 26 |
else:
|
| 27 |
IP = "0.0.0.0"
|
| 28 |
PORT = 8080
|
|
|
|
| 29 |
class spaces:
|
| 30 |
class GPU:
|
| 31 |
def __init__(self, duration=60):
|
| 32 |
self.duration = duration
|
| 33 |
def __call__(self, func):
|
| 34 |
-
return func
|
|
|
|
| 35 |
|
| 36 |
import os
|
| 37 |
import shutil
|
|
|
|
| 11 |
if not args.local:
|
| 12 |
import os
|
| 13 |
import spaces
|
| 14 |
+
|
| 15 |
+
os.system("pip install -r requirements.txt")
|
| 16 |
+
os.system("pip install -e .")
|
| 17 |
+
os.system("cd hy3dgen/texgen/custom_rasterizer && python3 setup.py install")
|
| 18 |
+
os.system("cd hy3dgen/texgen/differentiable_renderer && python3 setup.py install")
|
| 19 |
+
|
|
|
|
|
|
|
|
|
|
| 20 |
IP = "0.0.0.0"
|
| 21 |
PORT = 7860
|
| 22 |
|
| 23 |
else:
|
| 24 |
IP = "0.0.0.0"
|
| 25 |
PORT = 8080
|
| 26 |
+
|
| 27 |
class spaces:
|
| 28 |
class GPU:
|
| 29 |
def __init__(self, duration=60):
|
| 30 |
self.duration = duration
|
| 31 |
def __call__(self, func):
|
| 32 |
+
return func
|
| 33 |
+
|
| 34 |
|
| 35 |
import os
|
| 36 |
import shutil
|