eaglelandsonce commited on
Commit
c05a183
·
1 Parent(s): 425a66e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -12
app.py CHANGED
@@ -201,18 +201,17 @@ def main():
201
 
202
  user_prompt = st.text_area("Enter prompts, instructions & questions:", '', height=100)
203
 
204
- # Audio, transcribe, GPT:
205
- filename = save_and_play_audio(audio_recorder)
206
- if filename is not None:
207
- transcription = transcribe_audio(openai.api_key, filename, "whisper-1")
208
- #st.text_area(transcription, height = 100)
209
- gptOutput = chat_with_model(transcription, '') # push transcript through as prompt
210
- user_prompt = transcription
211
- filename = generate_filename(transcription, choice)
212
- create_file(filename, transcription, gptOutput)
213
- st.sidebar.markdown(get_table_download_link(filename), unsafe_allow_html=True)
214
-
215
-
216
 
217
  if st.button('💬 Chat'):
218
  st.write('Reasoning with your inputs...')
 
201
 
202
  user_prompt = st.text_area("Enter prompts, instructions & questions:", '', height=100)
203
 
204
+ with st.sidebar.expander("Model Options", expanded=False):
205
+ # Audio, transcribe, GPT:
206
+ filename = save_and_play_audio(audio_recorder)
207
+ if filename is not None:
208
+ transcription = transcribe_audio(openai.api_key, filename, "whisper-1")
209
+ #st.text_area(transcription, height = 100)
210
+ gptOutput = chat_with_model(transcription, '') # push transcript through as prompt
211
+ filename = generate_filename(transcription, choice)
212
+ create_file(filename, transcription, gptOutput)
213
+ st.sidebar.markdown(get_table_download_link(filename), unsafe_allow_html=True)
214
+
 
215
 
216
  if st.button('💬 Chat'):
217
  st.write('Reasoning with your inputs...')