Spaces:
Running
on
Zero
Running
on
Zero
Update app_org.py
Browse files- app_org.py +30 -21
app_org.py
CHANGED
@@ -3,28 +3,28 @@ import subprocess
|
|
3 |
import os
|
4 |
import spaces
|
5 |
|
6 |
-
def install_cuda_toolkit():
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
|
24 |
-
install_cuda_toolkit()
|
25 |
|
26 |
-
from gradio_tabs.animation import animation
|
27 |
-
from gradio_tabs.vid_edit import vid_edit
|
28 |
|
29 |
def load_file(path):
|
30 |
|
@@ -44,6 +44,14 @@ custom_css = """
|
|
44 |
</style>
|
45 |
"""
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo:
|
49 |
# ... (input/output setup remains unchanged)
|
@@ -55,8 +63,9 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo:
|
|
55 |
|
56 |
with gr.Row():
|
57 |
with gr.Tabs():
|
58 |
-
|
59 |
-
|
|
|
60 |
|
61 |
|
62 |
#if __name__ == "__main__":
|
|
|
3 |
import os
|
4 |
import spaces
|
5 |
|
6 |
+
# def install_cuda_toolkit():
|
7 |
+
# # CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run"
|
8 |
+
# # CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux.run"
|
9 |
+
# CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda_11.7.0_515.43.04_linux.run"
|
10 |
+
# CUDA_TOOLKIT_FILE = "/tmp/%s" % os.path.basename(CUDA_TOOLKIT_URL)
|
11 |
+
# subprocess.call(["wget", "-q", CUDA_TOOLKIT_URL, "-O", CUDA_TOOLKIT_FILE])
|
12 |
+
# subprocess.call(["chmod", "+x", CUDA_TOOLKIT_FILE])
|
13 |
+
# subprocess.call([CUDA_TOOLKIT_FILE, "--silent", "--toolkit"])
|
14 |
|
15 |
+
# os.environ["CUDA_HOME"] = "/usr/local/cuda"
|
16 |
+
# os.environ["PATH"] = "%s/bin:%s" % (os.environ["CUDA_HOME"], os.environ["PATH"])
|
17 |
+
# os.environ["LD_LIBRARY_PATH"] = "%s/lib:%s" % (
|
18 |
+
# os.environ["CUDA_HOME"],
|
19 |
+
# "" if "LD_LIBRARY_PATH" not in os.environ else os.environ["LD_LIBRARY_PATH"],
|
20 |
+
# )
|
21 |
+
# # Fix: arch_list[-1] += '+PTX'; IndexError: list index out of range
|
22 |
+
# os.environ["TORCH_CUDA_ARCH_LIST"] = "8.0;8.6"
|
23 |
|
24 |
+
# install_cuda_toolkit()
|
25 |
|
26 |
+
# from gradio_tabs.animation import animation
|
27 |
+
# from gradio_tabs.vid_edit import vid_edit
|
28 |
|
29 |
def load_file(path):
|
30 |
|
|
|
44 |
</style>
|
45 |
"""
|
46 |
|
47 |
+
@spaces.GPU
|
48 |
+
def load_tabs():
|
49 |
+
from gradio_tabs.animation import animation
|
50 |
+
from gradio_tabs.vid_edit import vid_edit
|
51 |
+
|
52 |
+
animation()
|
53 |
+
vid_edit()
|
54 |
+
|
55 |
|
56 |
with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo:
|
57 |
# ... (input/output setup remains unchanged)
|
|
|
63 |
|
64 |
with gr.Row():
|
65 |
with gr.Tabs():
|
66 |
+
load_tabs()
|
67 |
+
#animation()
|
68 |
+
#vid_edit()
|
69 |
|
70 |
|
71 |
#if __name__ == "__main__":
|