Spaces:
Runtime error
Runtime error
Add zero gpu support
Browse files
app.py
CHANGED
|
@@ -29,6 +29,8 @@ import ffmpeg
|
|
| 29 |
from moviepy.editor import *
|
| 30 |
from transformers import WhisperModel
|
| 31 |
|
|
|
|
|
|
|
| 32 |
if os.getenv('SYSTEM') == 'spaces':
|
| 33 |
subprocess.run(["bash", "install.sh"])
|
| 34 |
|
|
@@ -186,6 +188,7 @@ def fast_check_ffmpeg():
|
|
| 186 |
|
| 187 |
|
| 188 |
@torch.no_grad()
|
|
|
|
| 189 |
def inference(audio_path, video_path, bbox_shift, extra_margin=10, parsing_mode="jaw",
|
| 190 |
left_cheek_width=90, right_cheek_width=90, progress=gr.Progress(track_tqdm=True)):
|
| 191 |
# Set default parameters, aligned with inference.py
|
|
|
|
| 29 |
from moviepy.editor import *
|
| 30 |
from transformers import WhisperModel
|
| 31 |
|
| 32 |
+
import spaces
|
| 33 |
+
|
| 34 |
if os.getenv('SYSTEM') == 'spaces':
|
| 35 |
subprocess.run(["bash", "install.sh"])
|
| 36 |
|
|
|
|
| 188 |
|
| 189 |
|
| 190 |
@torch.no_grad()
|
| 191 |
+
@spaces.GPU
|
| 192 |
def inference(audio_path, video_path, bbox_shift, extra_margin=10, parsing_mode="jaw",
|
| 193 |
left_cheek_width=90, right_cheek_width=90, progress=gr.Progress(track_tqdm=True)):
|
| 194 |
# Set default parameters, aligned with inference.py
|