Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,10 +14,10 @@ os.system('pip install scikit-video')
|
|
| 14 |
os.system('pip install transformers')
|
| 15 |
os.system('pip install gradio==3.12')
|
| 16 |
os.system('pip install numpy==1.23.3')
|
| 17 |
-
|
| 18 |
|
| 19 |
sys.path.append('/home/user/app/av_hubert')
|
| 20 |
-
sys.path.append('/home/user/app/av_hubert/avhubert')
|
| 21 |
|
| 22 |
print(sys.path)
|
| 23 |
print(os.listdir())
|
|
@@ -31,18 +31,20 @@ import numpy as np
|
|
| 31 |
import skvideo
|
| 32 |
import skvideo.io
|
| 33 |
from tqdm import tqdm
|
| 34 |
-
from preparation.align_mouth import landmarks_interpolate, crop_patch, write_video_ffmpeg
|
| 35 |
from base64 import b64encode
|
| 36 |
import torch
|
| 37 |
import cv2
|
| 38 |
import tempfile
|
| 39 |
from argparse import Namespace
|
| 40 |
-
import fairseq
|
| 41 |
-
from fairseq import checkpoint_utils, options, tasks, utils
|
| 42 |
-
from fairseq.dataclass.configs import GenerationConfig
|
| 43 |
from huggingface_hub import hf_hub_download
|
| 44 |
import gradio as gr
|
| 45 |
|
|
|
|
|
|
|
| 46 |
user_dir = "/home/user/app/av_hubert/avhubert"
|
| 47 |
utils.import_user_module(Namespace(user_dir=user_dir))
|
| 48 |
data_dir = tempfile.mkdtemp()
|
|
|
|
| 14 |
os.system('pip install transformers')
|
| 15 |
os.system('pip install gradio==3.12')
|
| 16 |
os.system('pip install numpy==1.23.3')
|
| 17 |
+
|
| 18 |
|
| 19 |
sys.path.append('/home/user/app/av_hubert')
|
| 20 |
+
# sys.path.append('/home/user/app/av_hubert/avhubert')
|
| 21 |
|
| 22 |
print(sys.path)
|
| 23 |
print(os.listdir())
|
|
|
|
| 31 |
import skvideo
|
| 32 |
import skvideo.io
|
| 33 |
from tqdm import tqdm
|
| 34 |
+
from av_hubert.avhubert.preparation.align_mouth import landmarks_interpolate, crop_patch, write_video_ffmpeg
|
| 35 |
from base64 import b64encode
|
| 36 |
import torch
|
| 37 |
import cv2
|
| 38 |
import tempfile
|
| 39 |
from argparse import Namespace
|
| 40 |
+
import av_hubert.fairseq
|
| 41 |
+
from av_hubert.fairseq import checkpoint_utils, options, tasks, utils
|
| 42 |
+
from av_hubert.fairseq.dataclass.configs import GenerationConfig
|
| 43 |
from huggingface_hub import hf_hub_download
|
| 44 |
import gradio as gr
|
| 45 |
|
| 46 |
+
os.chdir('/home/user/app/av_hubert/avhubert')
|
| 47 |
+
|
| 48 |
user_dir = "/home/user/app/av_hubert/avhubert"
|
| 49 |
utils.import_user_module(Namespace(user_dir=user_dir))
|
| 50 |
data_dir = tempfile.mkdtemp()
|