Stefano Demartis Claude Opus 4.6 commited on
Commit ·
0c80e93
1
Parent(s): 961bb51
fix: return install error in status field instead of raising
Browse filesCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -305,7 +305,10 @@ def gradio_infer(
|
|
| 305 |
save_scores, flip, size, reverse
|
| 306 |
):
|
| 307 |
# <<< ZeroGPU 分配后:按需安装 Pytorch-Correlation-extension >>>
|
| 308 |
-
|
|
|
|
|
|
|
|
|
|
| 309 |
# --------------------------------------------------------------
|
| 310 |
|
| 311 |
# 1) 基本校验与临时目录
|
|
|
|
| 305 |
save_scores, flip, size, reverse
|
| 306 |
):
|
| 307 |
# <<< ZeroGPU 分配后:按需安装 Pytorch-Correlation-extension >>>
|
| 308 |
+
try:
|
| 309 |
+
ensure_correlation_extension_installed()
|
| 310 |
+
except Exception as install_err:
|
| 311 |
+
return None, f"spatial-correlation-sampler install failed:\n{install_err}"
|
| 312 |
# --------------------------------------------------------------
|
| 313 |
|
| 314 |
# 1) 基本校验与临时目录
|