build_ext
Browse files
app.py
CHANGED
@@ -6,11 +6,21 @@
|
|
6 |
|
7 |
import copy
|
8 |
import os
|
|
|
9 |
from datetime import datetime
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
import gradio as gr
|
12 |
|
13 |
-
os.environ["TORCH_CUDNN_SDPA_ENABLED"] = "
|
14 |
import tempfile
|
15 |
|
16 |
import cv2
|
|
|
6 |
|
7 |
import copy
|
8 |
import os
|
9 |
+
import subprocess
|
10 |
from datetime import datetime
|
11 |
|
12 |
+
command = ["python", "setup.py", "build_ext", "--inplace"]
|
13 |
+
result = subprocess.run(command, capture_output=True, text=True)
|
14 |
+
print("Output:\n", result.stdout)
|
15 |
+
print("Errors:\n", result.stderr)
|
16 |
+
if result.returncode == 0:
|
17 |
+
print("Command executed successfully.")
|
18 |
+
else:
|
19 |
+
print("Command failed with return code:", result.returncode)
|
20 |
+
|
21 |
import gradio as gr
|
22 |
|
23 |
+
os.environ["TORCH_CUDNN_SDPA_ENABLED"] = "1"
|
24 |
import tempfile
|
25 |
|
26 |
import cv2
|