feiyang-cai commited on
Commit
8a10e7f
·
verified ·
1 Parent(s): b85816b

Show generation failure warning

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -531,8 +531,10 @@ def ui_inverse_design(n_generate: float, mode: str, load_idx: float, *values: fl
531
  exc_text = str(exc)
532
  if "ZeroGPU quota" in exc_text or "quota" in exc_text.lower():
533
  title = "ZeroGPU quota is exhausted or unavailable."
 
534
  else:
535
  title = "Generation failed before candidate simulation."
 
536
  message = (
537
  f"{title}\n\n"
538
  f"Error: {type(exc).__name__}: {exc_text}\n\n"
 
531
  exc_text = str(exc)
532
  if "ZeroGPU quota" in exc_text or "quota" in exc_text.lower():
533
  title = "ZeroGPU quota is exhausted or unavailable."
534
+ gr.Warning("ZeroGPU quota is exhausted or unavailable. Switch to Nvidia T4 small or retry after quota is restored.")
535
  else:
536
  title = "Generation failed before candidate simulation."
537
+ gr.Warning("Generation failed before candidate simulation. See the run log for details.")
538
  message = (
539
  f"{title}\n\n"
540
  f"Error: {type(exc).__name__}: {exc_text}\n\n"