LogicGoInfotechSpaces commited on
Commit
ce851ce
Β·
1 Parent(s): 40590fc

fix: always allow local fallback even if remote client missing; remove blocking error

Browse files
Files changed (1) hide show
  1. app.py +1 -11
app.py CHANGED
@@ -91,17 +91,7 @@ def _run_local_faceswap(source_image_path: str, target_video_path: str) -> Optio
91
 
92
  # ── main generate ────────────────────────────────────────────────────
93
  def generate(input_image, input_video):
94
-
95
- # If backend client failed to initialize, show a clear error and bail
96
- if client is None:
97
- msg = (
98
- "Backend unavailable. Please set Space Secret 'TOKEN' (and optionally 'BACKEND_SPACE'). "
99
- f"Current BACKEND_SPACE='{backend_space}'. Error: {client_init_error}"
100
- )
101
- gr.Error(msg)
102
- return None
103
-
104
- # Minimal mode: no gender selector
105
 
106
  try:
107
  gr.Info("Processing started. This may take 1-3 minutes on first run.")
 
91
 
92
  # ── main generate ────────────────────────────────────────────────────
93
  def generate(input_image, input_video):
94
+ # Minimal mode: no gender selector; if remote client is missing, we fall back to local
 
 
 
 
 
 
 
 
 
 
95
 
96
  try:
97
  gr.Info("Processing started. This may take 1-3 minutes on first run.")