Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -69,14 +69,14 @@ def ui():
|
|
69 |
memory=ConversationBufferWindowMemory(k=2)
|
70 |
)
|
71 |
|
72 |
-
if 'history' not in st.session_state:
|
73 |
-
|
74 |
|
75 |
-
if 'generated' not in st.session_state:
|
76 |
-
|
77 |
|
78 |
-
if 'past' not in st.session_state:
|
79 |
-
|
80 |
|
81 |
if user_api_key is not None and user_api_key.strip() != "":
|
82 |
eleven_labs_api_key = st.sidebar.text_input(
|
@@ -97,7 +97,7 @@ def ui():
|
|
97 |
wav_file = open("./output_audio.mp3", "wb")
|
98 |
wav_file.write(audio_file.tobytes())
|
99 |
submit_button = st.form_submit_button(label='Send')
|
100 |
-
if submit_button
|
101 |
output_file_path = "./output_audio.mp3"
|
102 |
# save_uploaded_file_as_mp3(audio_file,output_file_path )
|
103 |
hindi_input_audio,sample_rate=torchaudio.load(output_file_path)
|
|
|
69 |
memory=ConversationBufferWindowMemory(k=2)
|
70 |
)
|
71 |
|
72 |
+
# if 'history' not in st.session_state:
|
73 |
+
# st.session_state['history'] = []
|
74 |
|
75 |
+
# if 'generated' not in st.session_state:
|
76 |
+
# st.session_state['generated'] = ["Hello ! Ask me anything about " + " π€"]
|
77 |
|
78 |
+
# if 'past' not in st.session_state:
|
79 |
+
# st.session_state['past'] = ["Hey ! π"]
|
80 |
|
81 |
if user_api_key is not None and user_api_key.strip() != "":
|
82 |
eleven_labs_api_key = st.sidebar.text_input(
|
|
|
97 |
wav_file = open("./output_audio.mp3", "wb")
|
98 |
wav_file.write(audio_file.tobytes())
|
99 |
submit_button = st.form_submit_button(label='Send')
|
100 |
+
if submit_button :
|
101 |
output_file_path = "./output_audio.mp3"
|
102 |
# save_uploaded_file_as_mp3(audio_file,output_file_path )
|
103 |
hindi_input_audio,sample_rate=torchaudio.load(output_file_path)
|