File size: 895 Bytes
3db63ac
 
 
 
 
 
 
 
 
4fc759d
 
 
 
b6b4631
482c73a
b6b4631
7eee09a
482c73a
c517ba2
 
 
 
 
 
7eee09a
986de0b
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import os
import sys

os.system('git clone https://github.com/facebookresearch/av_hubert.git')
os.chdir('av_hubert')
os.system('git submodule init')
os.system('git submodule update')
os.chdir('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.chdir('../')

print(os.listdir())
sys.path.append('avhubert')

import gradio as gr
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 cv2
import tempfile
from argparse import Namespace
import fairseq
from fairseq import checkpoint_utils, options, tasks, utils
from fairseq.dataclass.configs import GenerationConfig
import torch