Pushkar02-n commited on
Commit
2434d88
·
1 Parent(s): a3003cb

Fix clone error

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -37,13 +37,17 @@ model = OmniVoice.from_pretrained(
37
  )
38
 
39
 
40
- def estimate_duration(text, ref_text=None, steps=32, **_):
41
  """Declare only the GPU time we plausibly need. Saves visitor quota
42
- and improves queue priority."""
 
 
 
 
43
  chars = len((text or "").strip())
44
  # OmniVoice is very fast on H200; the floor is startup overhead.
45
  seconds = 8 + (chars / 100.0) * 2.0 * (int(steps) / 32.0)
46
- if ref_text is not None and not (ref_text or "").strip():
47
  seconds += 10 # Whisper transcription runs on GPU too
48
  return min(int(seconds), 60)
49
 
 
37
  )
38
 
39
 
40
+ def estimate_duration(text, ref_audio=None, ref_text=None, steps=32, speed=1.0):
41
  """Declare only the GPU time we plausibly need. Saves visitor quota
42
+ and improves queue priority.
43
+
44
+ The signature must mirror the decorated function's parameters, because
45
+ ZeroGPU forwards the call's arguments here positionally.
46
+ """
47
  chars = len((text or "").strip())
48
  # OmniVoice is very fast on H200; the floor is startup overhead.
49
  seconds = 8 + (chars / 100.0) * 2.0 * (int(steps) / 32.0)
50
+ if not (ref_text or "").strip():
51
  seconds += 10 # Whisper transcription runs on GPU too
52
  return min(int(seconds), 60)
53