Spaces:
Running
Running
Commit
•
d7c516b
1
Parent(s):
9e55dd9
Update app.py
Browse files
app.py
CHANGED
@@ -55,15 +55,15 @@ if sumbit_btn:
|
|
55 |
messages = st.container(height=300)
|
56 |
input_user = st.chat_input(placeholder='Enter message for your partner...')
|
57 |
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
|
|
55 |
messages = st.container(height=300)
|
56 |
input_user = st.chat_input(placeholder='Enter message for your partner...')
|
57 |
|
58 |
+
if input_user:
|
59 |
+
answer = gptClient.create_completion("gpt3", f"Answer on this question as beautiful nice kind {gender}: " + input_user)
|
60 |
+
print("Answer generated. Generating audio")
|
61 |
+
output_audio = get_speech(input_user, answer)
|
62 |
+
print("Audio generated. Generating video")
|
63 |
+
output_video = get_dreamtalk(img_prompt, output_audio)
|
64 |
+
print("Video Generating. Sending to user")
|
65 |
|
66 |
+
with messages.message("user"):
|
67 |
+
st.write(input_user)
|
68 |
+
with messages.message("Partner", avatar=img_prompt):
|
69 |
+
st.video(output_video)
|