test
Browse files
app.py
CHANGED
@@ -107,15 +107,18 @@ def find_cuda_home():
|
|
107 |
except Exception as e:
|
108 |
print(f"Error finding CUDA_HOME: {e}")
|
109 |
return None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
|
111 |
|
112 |
@spaces.GPU
|
113 |
def upsample_features(image, model_option):
|
114 |
-
print(torch.cuda.is_available())
|
115 |
-
from torch.utils.cpp_extension import _find_cuda_home
|
116 |
-
cuda_home = _find_cuda_home()
|
117 |
-
if cuda_home is None:
|
118 |
-
raise EnvironmentError("CUDA_HOME could not be found.")
|
119 |
|
120 |
os.environ["CUDA_HOME"] = cuda_home
|
121 |
print(os.environ["CUDA_HOME"])
|
|
|
107 |
except Exception as e:
|
108 |
print(f"Error finding CUDA_HOME: {e}")
|
109 |
return None
|
110 |
+
|
111 |
+
|
112 |
+
|
113 |
+
print(torch.cuda.is_available())
|
114 |
+
from torch.utils.cpp_extension import _find_cuda_home
|
115 |
+
cuda_home = _find_cuda_home()
|
116 |
+
if cuda_home is None:
|
117 |
+
raise EnvironmentError("CUDA_HOME could not be found.")
|
118 |
|
119 |
|
120 |
@spaces.GPU
|
121 |
def upsample_features(image, model_option):
|
|
|
|
|
|
|
|
|
|
|
122 |
|
123 |
os.environ["CUDA_HOME"] = cuda_home
|
124 |
print(os.environ["CUDA_HOME"])
|