Spaces:
Running
on
Zero
Running
on
Zero
Upload gradio_app.py with huggingface_hub
Browse files- gradio_app.py +12 -15
gradio_app.py
CHANGED
|
@@ -1,19 +1,6 @@
|
|
| 1 |
# pip install gradio==3.39.0
|
| 2 |
import os
|
| 3 |
-
|
| 4 |
-
os.system("cd /home/user/app/hy3dgen/texgen/differentiable_renderer/ && bash compile_mesh_painter.sh")
|
| 5 |
-
os.system("cd /home/user/app/hy3dgen/texgen/custom_rasterizer && pip install .")
|
| 6 |
-
|
| 7 |
-
import shutil
|
| 8 |
-
import time
|
| 9 |
-
from glob import glob
|
| 10 |
-
|
| 11 |
-
import gradio as gr
|
| 12 |
-
import torch
|
| 13 |
-
|
| 14 |
-
import spaces
|
| 15 |
-
|
| 16 |
-
|
| 17 |
def install_cuda_toolkit():
|
| 18 |
# CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run"
|
| 19 |
CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux.run"
|
|
@@ -31,8 +18,18 @@ def install_cuda_toolkit():
|
|
| 31 |
# Fix: arch_list[-1] += '+PTX'; IndexError: list index out of range
|
| 32 |
os.environ["TORCH_CUDA_ARCH_LIST"] = "8.0;8.6"
|
| 33 |
|
| 34 |
-
|
| 35 |
install_cuda_toolkit()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
def get_example_img_list():
|
| 38 |
print('Loading example img list ...')
|
|
|
|
| 1 |
# pip install gradio==3.39.0
|
| 2 |
import os
|
| 3 |
+
import subprocess
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
def install_cuda_toolkit():
|
| 5 |
# CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run"
|
| 6 |
CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux.run"
|
|
|
|
| 18 |
# Fix: arch_list[-1] += '+PTX'; IndexError: list index out of range
|
| 19 |
os.environ["TORCH_CUDA_ARCH_LIST"] = "8.0;8.6"
|
| 20 |
|
|
|
|
| 21 |
install_cuda_toolkit()
|
| 22 |
+
os.system("cd /home/user/app/hy3dgen/texgen/differentiable_renderer/ && bash compile_mesh_painter.sh")
|
| 23 |
+
os.system("cd /home/user/app/hy3dgen/texgen/custom_rasterizer && pip install .")
|
| 24 |
+
|
| 25 |
+
import shutil
|
| 26 |
+
import time
|
| 27 |
+
from glob import glob
|
| 28 |
+
|
| 29 |
+
import gradio as gr
|
| 30 |
+
import torch
|
| 31 |
+
|
| 32 |
+
import spaces
|
| 33 |
|
| 34 |
def get_example_img_list():
|
| 35 |
print('Loading example img list ...')
|