TDN-M commited on
Commit
37f1e48
·
verified ·
1 Parent(s): bc74a8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -44,19 +44,19 @@ if 'is_initialized' not in st.session_state:
44
 
45
  st.session_state.avatar.get_video_full_frames(st.session_state.avatar.ref_video_path_and_filename)
46
  st.session_state.avatar.face_detect_batch_size = 16
47
- # avatar.create_face_detection_results(avatar.video_full_frames,True)
48
  current_status_placeholder.write("load face detection result")
49
  st.session_state.face_det_results_dict={}
50
  for option in options:
51
  with open(f'ref_videos/{option}_face_det_result.pkl', 'rb') as file:
52
  st.session_state.face_det_results_dict[option] = pickle.load(file)
53
  st.session_state.avatar.face_detect_img_results =st.session_state.face_det_results_dict[st.session_state.selected_option]
54
- #st.session_state.avatar.face_det_results_path_and_name = 'ref_videos/Liv_face_det_result.pkl'
55
 
56
- #st.session_state.avatar.load_face_detection_results()
57
- # def load_face_detection_results(self):
58
- # with open(self.face_det_results_path_and_name, 'rb') as file:
59
- # self.face_detect_img_results = pickle.load(file)
60
  input_text = "Hi How are you?"
61
  st.session_state.avatar.text_to_lip_video(input_text,init_progress_bar)
62
  current_status_placeholder.write("load face detection result done")
 
44
 
45
  st.session_state.avatar.get_video_full_frames(st.session_state.avatar.ref_video_path_and_filename)
46
  st.session_state.avatar.face_detect_batch_size = 16
47
+ avatar.create_face_detection_results(avatar.video_full_frames,True)
48
  current_status_placeholder.write("load face detection result")
49
  st.session_state.face_det_results_dict={}
50
  for option in options:
51
  with open(f'ref_videos/{option}_face_det_result.pkl', 'rb') as file:
52
  st.session_state.face_det_results_dict[option] = pickle.load(file)
53
  st.session_state.avatar.face_detect_img_results =st.session_state.face_det_results_dict[st.session_state.selected_option]
54
+ st.session_state.avatar.face_det_results_path_and_name = 'ref_videos/Liv_face_det_result.pkl'
55
 
56
+ st.session_state.avatar.load_face_detection_results()
57
+ def load_face_detection_results(self):
58
+ with open(self.face_det_results_path_and_name, 'rb') as file:
59
+ self.face_detect_img_results = pickle.load(file)
60
  input_text = "Hi How are you?"
61
  st.session_state.avatar.text_to_lip_video(input_text,init_progress_bar)
62
  current_status_placeholder.write("load face detection result done")