Spaces:
Runtime error
Runtime error
Fix zero gpu renting duration
Browse files
app.py
CHANGED
|
@@ -31,6 +31,8 @@ from transformers import WhisperModel
|
|
| 31 |
|
| 32 |
import spaces
|
| 33 |
|
|
|
|
|
|
|
| 34 |
if os.getenv('SYSTEM') == 'spaces':
|
| 35 |
subprocess.run(["bash", "install.sh"])
|
| 36 |
|
|
@@ -188,7 +190,7 @@ def fast_check_ffmpeg():
|
|
| 188 |
return False
|
| 189 |
|
| 190 |
|
| 191 |
-
@spaces.GPU()
|
| 192 |
@torch.no_grad()
|
| 193 |
def inference(audio_path, video_path, bbox_shift, extra_margin=10, parsing_mode="jaw",
|
| 194 |
left_cheek_width=90, right_cheek_width=90, progress=gr.Progress(track_tqdm=True)):
|
|
|
|
| 31 |
|
| 32 |
import spaces
|
| 33 |
|
| 34 |
+
SPACES_MAX_DURATION = 25 * 60 # 25 minutes
|
| 35 |
+
|
| 36 |
if os.getenv('SYSTEM') == 'spaces':
|
| 37 |
subprocess.run(["bash", "install.sh"])
|
| 38 |
|
|
|
|
| 190 |
return False
|
| 191 |
|
| 192 |
|
| 193 |
+
@spaces.GPU(SPACES_MAX_DURATION)
|
| 194 |
@torch.no_grad()
|
| 195 |
def inference(audio_path, video_path, bbox_shift, extra_margin=10, parsing_mode="jaw",
|
| 196 |
left_cheek_width=90, right_cheek_width=90, progress=gr.Progress(track_tqdm=True)):
|