awacke1 commited on
Commit
362535a
·
verified ·
1 Parent(s): 3c2f20e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -10
app.py CHANGED
@@ -764,7 +764,18 @@ def whisper_main():
764
  transcript = transcription['text']
765
  st.write(transcript)
766
 
 
 
 
 
 
 
 
 
 
 
767
 
 
768
  # Whisper to Llama:
769
  response = StreamLLMChatResponse(transcript)
770
  filename_txt = generate_filename(transcript, ".txt")
@@ -775,16 +786,6 @@ def whisper_main():
775
  if os.path.exists(filename):
776
  os.remove(filename)
777
 
778
- # Whisper to GPT: New!! ---------------------------------------------------------------------
779
- st.write('Reasoning with your inputs with GPT..')
780
- response = chat_with_model(prompt_section, ''.join(list(document_sections)), model_choice)
781
- st.write('Response:')
782
- st.write(response)
783
- filename = generate_filename(user_prompt, choice)
784
- create_file(filename, user_prompt, response, should_save)
785
- # Whisper to GPT: New!! ---------------------------------------------------------------------
786
-
787
-
788
  except:
789
  st.write('Starting Whisper Model on GPU. Please retry in 30 seconds.')
790
 
 
764
  transcript = transcription['text']
765
  st.write(transcript)
766
 
767
+
768
+ # Whisper to GPT: New!! ---------------------------------------------------------------------
769
+ st.write('Reasoning with your inputs with GPT..')
770
+ response = chat_with_model(prompt_section, ''.join(list(document_sections)), model_choice)
771
+ st.write('Response:')
772
+ st.write(response)
773
+ filename = generate_filename(user_prompt, choice)
774
+ create_file(filename, user_prompt, response, should_save)
775
+ # Whisper to GPT: New!! ---------------------------------------------------------------------
776
+
777
 
778
+
779
  # Whisper to Llama:
780
  response = StreamLLMChatResponse(transcript)
781
  filename_txt = generate_filename(transcript, ".txt")
 
786
  if os.path.exists(filename):
787
  os.remove(filename)
788
 
 
 
 
 
 
 
 
 
 
 
789
  except:
790
  st.write('Starting Whisper Model on GPU. Please retry in 30 seconds.')
791