Spaces:
Running on Zero
Running on Zero
Calibrate xlarge reservation from live runtime
Browse files
app.py
CHANGED
|
@@ -14,7 +14,6 @@ os.environ.setdefault("PYTORCH_CUDA_ALLOC_CONF", "expandable_segments:True")
|
|
| 14 |
os.environ.setdefault("TOKENIZERS_PARALLELISM", "false")
|
| 15 |
|
| 16 |
import glob
|
| 17 |
-
import math
|
| 18 |
import subprocess
|
| 19 |
import sys
|
| 20 |
import time
|
|
@@ -246,10 +245,7 @@ def _estimate(
|
|
| 246 |
):
|
| 247 |
return 10
|
| 248 |
|
| 249 |
-
|
| 250 |
-
num_clips = max(1, math.ceil(audio_duration / clip_duration))
|
| 251 |
-
duration = 45 + (num_clips - 1) * 3 + (int(max_new_tokens) / MAX_NEW_TOKENS) * 10
|
| 252 |
-
return int(min(MAX_GPU_DURATION_SECONDS, math.ceil(duration)))
|
| 253 |
|
| 254 |
|
| 255 |
def _generate(
|
|
|
|
| 14 |
os.environ.setdefault("TOKENIZERS_PARALLELISM", "false")
|
| 15 |
|
| 16 |
import glob
|
|
|
|
| 17 |
import subprocess
|
| 18 |
import sys
|
| 19 |
import time
|
|
|
|
| 245 |
):
|
| 246 |
return 10
|
| 247 |
|
| 248 |
+
return MAX_GPU_DURATION_SECONDS
|
|
|
|
|
|
|
|
|
|
| 249 |
|
| 250 |
|
| 251 |
def _generate(
|