Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -106,8 +106,8 @@ import math
|
|
106 |
IN_HF_SPACE = os.environ.get('SPACE_ID') is not None
|
107 |
|
108 |
# 添加变量跟踪GPU可用性
|
109 |
-
GPU_AVAILABLE =
|
110 |
-
GPU_INITIALIZED =
|
111 |
last_update_time = time.time()
|
112 |
|
113 |
# 如果在Hugging Face Space中,导入spaces模块
|
@@ -132,7 +132,7 @@ if IN_HF_SPACE:
|
|
132 |
else:
|
133 |
print("警告: CUDA报告可用,但未检测到GPU设备")
|
134 |
except Exception as e:
|
135 |
-
GPU_AVAILABLE =
|
136 |
print(f"检查GPU时出错: {e}")
|
137 |
print("将使用CPU模式运行")
|
138 |
except ImportError:
|
|
|
106 |
IN_HF_SPACE = os.environ.get('SPACE_ID') is not None
|
107 |
|
108 |
# 添加变量跟踪GPU可用性
|
109 |
+
GPU_AVAILABLE = True
|
110 |
+
GPU_INITIALIZED = True
|
111 |
last_update_time = time.time()
|
112 |
|
113 |
# 如果在Hugging Face Space中,导入spaces模块
|
|
|
132 |
else:
|
133 |
print("警告: CUDA报告可用,但未检测到GPU设备")
|
134 |
except Exception as e:
|
135 |
+
GPU_AVAILABLE = True
|
136 |
print(f"检查GPU时出错: {e}")
|
137 |
print("将使用CPU模式运行")
|
138 |
except ImportError:
|