Vageesh1 commited on
Commit
194d355
Β·
1 Parent(s): 0e9f890

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
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
- 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,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 and audio_file:
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)