Spaces:
Running
Running
voice synched video created
Browse files
app.py
CHANGED
@@ -35,6 +35,8 @@ if 'is_initialized' not in st.session_state:
|
|
35 |
# avatar.create_face_detection_results(avatar.video_full_frames,True)
|
36 |
print("load face detection result")
|
37 |
st.session_state.avatar.load_face_detection_results()
|
|
|
|
|
38 |
print("load face detection result done")
|
39 |
st.session_state['is_initialized'] = True
|
40 |
|
@@ -42,6 +44,9 @@ if 'is_initialized' not in st.session_state:
|
|
42 |
from avatar import Avatar
|
43 |
# Create a text input box and store the input in a variable
|
44 |
user_input = st.text_input("Enter your text:")
|
45 |
-
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
|
35 |
# avatar.create_face_detection_results(avatar.video_full_frames,True)
|
36 |
print("load face detection result")
|
37 |
st.session_state.avatar.load_face_detection_results()
|
38 |
+
input_text = "Hi How are you?"
|
39 |
+
st.session_state.avatar.text_to_lip_video(input_text)
|
40 |
print("load face detection result done")
|
41 |
st.session_state['is_initialized'] = True
|
42 |
|
|
|
44 |
from avatar import Avatar
|
45 |
# Create a text input box and store the input in a variable
|
46 |
user_input = st.text_input("Enter your text:")
|
47 |
+
if user_input:
|
48 |
+
st.session_state.avatar.dir_clean_up()
|
49 |
+
# Display the entered text
|
50 |
+
st.write("You entered:", user_input)
|
51 |
+
st.session_state.avatar.export_video=True
|
52 |
+
st.session_state.avatar.text_to_lip_video(user_input)
|