vumichien commited on
Commit
904c6e8
1 Parent(s): c5a3481

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -1
app.py CHANGED
@@ -18,8 +18,26 @@ sys.path.append('/home/user/app/av_hubert')
18
  sys.path.append('/home/user/app/av_hubert/avhubert')
19
 
20
  print(sys.path)
 
21
  import dlib, cv2, os
22
  import numpy as np
23
  import skvideo
24
  import skvideo.io
25
- from tqdm import tqdm
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  sys.path.append('/home/user/app/av_hubert/avhubert')
19
 
20
  print(sys.path)
21
+
22
  import dlib, cv2, os
23
  import numpy as np
24
  import skvideo
25
  import skvideo.io
26
+ from tqdm import tqdm
27
+ from preparation.align_mouth import landmarks_interpolate, crop_patch, write_video_ffmpeg
28
+ from base64 import b64encode
29
+ import torch
30
+ import cv2
31
+ import tempfile
32
+ from argparse import Namespace
33
+ import fairseq
34
+ from fairseq import checkpoint_utils, options, tasks, utils
35
+ from fairseq.dataclass.configs import GenerationConfig
36
+ from huggingface_hub import hf_hub_download
37
+
38
+ ckpt_path = hf_hub_download('vumichien/AV-HuBERT', 'model.pt')
39
+ user_dir = "/home/user/app/av_hubert/avhubert"
40
+ face_detector_path = "/home/user/app/mmod_human_face_detector.dat"
41
+ face_predictor_path = "/home/user/app/shape_predictor_68_face_landmarks.dat"
42
+ mean_face_path = "/home/user/app/20words_mean_face.npy"
43
+ mouth_roi_path = "/home/user/app/roi.mp4"