kobakhit commited on
Commit
af8cb29
1 Parent(s): 85a4a1c

gpt version

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -161,7 +161,7 @@ def load_audio(uploaded_audio):
161
 
162
 
163
  if "openai_model" not in st.session_state:
164
- st.session_state["openai_model"] = "gpt-3.5-turbo-16k"
165
 
166
  if "prompt_request_counter" not in st.session_state:
167
  st.session_state["prompt_request_counter"] = 0
@@ -311,6 +311,7 @@ if "audio" in locals():
311
  st.write(f'Loading {st.session_state.rttm}')
312
  diarization = load_rttm_file(st.session_state.rttm )
313
  else:
 
314
  # with ProgressHook() as hook:
315
  # diarization = pipeline(audio_, hook=hook)
316
  diarization = pipeline(create_audio_stream(audio))
@@ -448,7 +449,7 @@ if "audio" in locals():
448
 
449
 
450
  # LLM Chat
451
- with st.expander('Summary of the Transcribed Audio File Generated by ChatGPT', expanded = True):
452
  # display the AI generated summary.
453
  with st.chat_message("assistant", avatar='https://upload.wikimedia.org/wikipedia/commons/0/04/ChatGPT_logo.svg'):
454
  st.write(init)
@@ -508,7 +509,7 @@ if "audio" in locals():
508
  # encode transcript string
509
  transcript_json_download = convert_df(json.dumps(transcript_json))
510
  # transcript download buttons
511
- c1_b,c2_b = st.columns((1,2))
512
 
513
  # json button
514
  with c1_b:
 
161
 
162
 
163
  if "openai_model" not in st.session_state:
164
+ st.session_state["openai_model"] = "gpt-4o-mini"
165
 
166
  if "prompt_request_counter" not in st.session_state:
167
  st.session_state["prompt_request_counter"] = 0
 
311
  st.write(f'Loading {st.session_state.rttm}')
312
  diarization = load_rttm_file(st.session_state.rttm )
313
  else:
314
+ # make progress hook
315
  # with ProgressHook() as hook:
316
  # diarization = pipeline(audio_, hook=hook)
317
  diarization = pipeline(create_audio_stream(audio))
 
449
 
450
 
451
  # LLM Chat
452
+ with st.expander('Summary of the Transcribed Audio File Generated by [`gpt-40-mini`](https://platform.openai.com/docs/models/gpt-4o-mini)', expanded = True):
453
  # display the AI generated summary.
454
  with st.chat_message("assistant", avatar='https://upload.wikimedia.org/wikipedia/commons/0/04/ChatGPT_logo.svg'):
455
  st.write(init)
 
509
  # encode transcript string
510
  transcript_json_download = convert_df(json.dumps(transcript_json))
511
  # transcript download buttons
512
+ c1_b,c2_b = st.columns((1,1))
513
 
514
  # json button
515
  with c1_b: