awacke1 commited on
Commit
3305d82
β€’
1 Parent(s): ae728b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -181,8 +181,8 @@ def search_glossary(query):
181
  filename = generate_filename(query + ' --- ' + response, "md")
182
  create_file(filename, query, response, should_save)
183
 
184
- st.write('## πŸ” Running with Llama.') # -------------------------------------------------------------------------------------------------
185
- response2 = StreamLLMChatResponse(query)
186
  #st.write(response2)
187
 
188
  filename_txt = generate_filename(query + ' --- ' + response2, "md")
@@ -797,20 +797,20 @@ def whisper_main():
797
 
798
 
799
  # Whisper to Llama:
800
- response = StreamLLMChatResponse(transcript)
801
- filename_txt = generate_filename(transcript, "md")
802
- create_file(filename_txt, transcript, response, should_save)
803
-
804
- filename_wav = filename_txt.replace('.txt', '.wav')
805
- import shutil
806
- try:
807
- if os.path.exists(filename):
808
- shutil.copyfile(filename, filename_wav)
809
- except:
810
- st.write('.')
811
 
812
- if os.path.exists(filename):
813
- os.remove(filename)
814
 
815
  #st.experimental_rerun()
816
  #except:
 
181
  filename = generate_filename(query + ' --- ' + response, "md")
182
  create_file(filename, query, response, should_save)
183
 
184
+ #st.write('## πŸ” Running with Llama.') # -------------------------------------------------------------------------------------------------
185
+ #response2 = StreamLLMChatResponse(query)
186
  #st.write(response2)
187
 
188
  filename_txt = generate_filename(query + ' --- ' + response2, "md")
 
797
 
798
 
799
  # Whisper to Llama:
800
+ #response = StreamLLMChatResponse(transcript)
801
+ #filename_txt = generate_filename(transcript, "md")
802
+ #create_file(filename_txt, transcript, response, should_save)
803
+
804
+ #filename_wav = filename_txt.replace('.txt', '.wav')
805
+ #import shutil
806
+ #try:
807
+ # if os.path.exists(filename):
808
+ # shutil.copyfile(filename, filename_wav)
809
+ #except:
810
+ # st.write('.')
811
 
812
+ #if os.path.exists(filename):
813
+ # os.remove(filename)
814
 
815
  #st.experimental_rerun()
816
  #except: