Spaces:
Runtime error
Runtime error
import os | |
import sys | |
os.system('git clone https://github.com/facebookresearch/av_hubert.git') | |
os.chdir('/home/user/app/av_hubert') | |
os.system('git submodule init') | |
os.system('git submodule update') | |
os.chdir('/home/user/app/av_hubert/fairseq') | |
os.system('pip install ./') | |
os.system('pip install sentencepiece') | |
os.system('pip install python_speech_features') | |
os.system('pip install scikit-video') | |
os.system('pip install transformers') | |
os.system('pip install gradio==3.12') | |
os.chdir('/home/user/app/av_hubert/avhubert') | |
sys.path.append('/home/user/app/av_hubert') | |
sys.path.append('/home/user/app/av_hubert/avhubert') | |
print(sys.path) | |
import dlib, cv2, os | |
import numpy as np | |
import skvideo | |
import skvideo.io | |
from tqdm import tqdm | |
from preparation.align_mouth import landmarks_interpolate, crop_patch, write_video_ffmpeg | |
from base64 import b64encode | |
import torch | |
import cv2 | |
import tempfile | |
from argparse import Namespace | |
import fairseq | |
from fairseq import checkpoint_utils, options, tasks, utils | |
from fairseq.dataclass.configs import GenerationConfig | |
from huggingface_hub import hf_hub_download | |
ckpt_path = hf_hub_download('vumichien/AV-HuBERT', 'model.pt') | |
user_dir = "/home/user/app/av_hubert/avhubert" | |
face_detector_path = "/home/user/app/mmod_human_face_detector.dat" | |
face_predictor_path = "/home/user/app/shape_predictor_68_face_landmarks.dat" | |
mean_face_path = "/home/user/app/20words_mean_face.npy" | |
mouth_roi_path = "/home/user/app/roi.mp4" |