harp-dev commited on
Commit
60f2ba3
·
verified ·
1 Parent(s): 983ec98

Size the GPU reservation by measured cost.

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -74,11 +74,12 @@ model.eval()
74
  print("✓ Model loaded successfully")
75
 
76
  # The whole recording is restored in one pass, so the cost grows with its length
77
- MAX_INPUT_SECONDS = 420
78
 
79
 
80
  def gpu_seconds(input_audio_path: str) -> float:
81
- return 10 + 0.4 * sf.info(input_audio_path).duration
 
82
 
83
 
84
  def process_fn(
 
74
  print("✓ Model loaded successfully")
75
 
76
  # The whole recording is restored in one pass, so the cost grows with its length
77
+ MAX_INPUT_SECONDS = 600
78
 
79
 
80
  def gpu_seconds(input_audio_path: str) -> float:
81
+ # Measured at about 8 s for 20 s of audio and 9 s for 60 s, nearly all of it fixed, padded
82
+ return 10 + 0.1 * sf.info(input_audio_path).duration
83
 
84
 
85
  def process_fn(