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 files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -305,7 +305,10 @@ def gradio_infer(
305
  save_scores, flip, size, reverse
306
  ):
307
  # <<< ZeroGPU 分配后:按需安装 Pytorch-Correlation-extension >>>
308
- ensure_correlation_extension_installed()
 
 
 
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) 基本校验与临时目录