Spaces:
Running on Zero
Running on Zero
Size the GPU reservation by measured cost.
Browse files
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 =
|
| 78 |
|
| 79 |
|
| 80 |
def gpu_seconds(input_audio_path: str) -> float:
|
| 81 |
-
|
|
|
|
| 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(
|