Spaces:
Runtime error
Runtime error
wangmengchao
commited on
Commit
·
3d34307
1
Parent(s):
9cb4b03
fix
Browse files
app.py
CHANGED
|
@@ -4,6 +4,8 @@ import argparse
|
|
| 4 |
from datetime import datetime
|
| 5 |
import librosa
|
| 6 |
from infer import load_models,main
|
|
|
|
|
|
|
| 7 |
try:
|
| 8 |
import torch
|
| 9 |
if torch.cuda.is_available():
|
|
@@ -12,7 +14,7 @@ except Exception as e:
|
|
| 12 |
print(f"GPU warmup failed: {e}")
|
| 13 |
|
| 14 |
pipe,fantasytalking,wav2vec_processor,wav2vec = None,None,None,None
|
| 15 |
-
|
| 16 |
def generate_video(
|
| 17 |
image_path,
|
| 18 |
audio_path,
|
|
|
|
| 4 |
from datetime import datetime
|
| 5 |
import librosa
|
| 6 |
from infer import load_models,main
|
| 7 |
+
import spaces
|
| 8 |
+
|
| 9 |
try:
|
| 10 |
import torch
|
| 11 |
if torch.cuda.is_available():
|
|
|
|
| 14 |
print(f"GPU warmup failed: {e}")
|
| 15 |
|
| 16 |
pipe,fantasytalking,wav2vec_processor,wav2vec = None,None,None,None
|
| 17 |
+
@spaces.GPU
|
| 18 |
def generate_video(
|
| 19 |
image_path,
|
| 20 |
audio_path,
|