hvoss-techfak commited on
Commit
b210c28
·
verified ·
1 Parent(s): dd3305d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -13
app.py CHANGED
@@ -107,6 +107,7 @@ def _check_quota(required_sec: int):
107
  Raises RuntimeError if not enough.
108
  """
109
  remaining = int(os.getenv("ZEROGPU_REMAINING", "0"))
 
110
  if remaining < required_sec:
111
  raise RuntimeError(
112
  f"Insufficient ZeroGPU quota: need {required_sec}s but only {remaining}s left.\n"
@@ -699,19 +700,6 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
699
  ):
700
 
701
  log_output = []
702
- try:
703
- _check_quota(90) # same value as @spaces.GPU
704
- except RuntimeError as exc: # failed → show the full text
705
- msg = exc_text(exc)
706
- log_output += f"\nERROR: {msg}\n"
707
- log_output += "\nThis usually means that your account, your IP adress or the space has no free GPU minutes left, or the process took too long due to too many filaments or changed parameters. Please clone the docker container, run it locally or wait for a bit.\n"
708
- gr.Error(msg) # red toast
709
- yield (
710
- "".join(log_output),
711
- gr.update(), # keep preview unchanged
712
- gr.update(),
713
- )
714
- return # stop here, no Worker is started
715
 
716
  # 0. Validate Inputs
717
  if input_image is None:
 
107
  Raises RuntimeError if not enough.
108
  """
109
  remaining = int(os.getenv("ZEROGPU_REMAINING", "0"))
110
+ print(os.env)
111
  if remaining < required_sec:
112
  raise RuntimeError(
113
  f"Insufficient ZeroGPU quota: need {required_sec}s but only {remaining}s left.\n"
 
700
  ):
701
 
702
  log_output = []
 
 
 
 
 
 
 
 
 
 
 
 
 
703
 
704
  # 0. Validate Inputs
705
  if input_image is None: