Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -846,11 +846,11 @@ def whisper_main():
|
|
| 846 |
|
| 847 |
|
| 848 |
# Whisper to Llama:
|
| 849 |
-
|
| 850 |
-
filename_txt = generate_filename(transcript, "md")
|
| 851 |
-
create_file(filename_txt, transcript, response, should_save)
|
| 852 |
|
| 853 |
-
filename_wav =
|
| 854 |
import shutil
|
| 855 |
try:
|
| 856 |
if os.path.exists(filename):
|
|
@@ -991,15 +991,15 @@ def main():
|
|
| 991 |
|
| 992 |
# Llama versus GPT Battle!
|
| 993 |
all=""
|
| 994 |
-
|
| 995 |
-
st.write('🔍Running with Llama.')
|
| 996 |
-
|
| 997 |
-
filename = generate_filename(user_prompt, "md")
|
| 998 |
-
|
| 999 |
-
all=response
|
| 1000 |
#SpeechSynthesis(response)
|
| 1001 |
-
|
| 1002 |
-
|
| 1003 |
|
| 1004 |
# gpt
|
| 1005 |
try:
|
|
|
|
| 846 |
|
| 847 |
|
| 848 |
# Whisper to Llama:
|
| 849 |
+
# response = StreamLLMChatResponse(transcript)
|
| 850 |
+
#filename_txt = generate_filename(transcript, "md")
|
| 851 |
+
#create_file(filename_txt, transcript, response, should_save)
|
| 852 |
|
| 853 |
+
filename_wav = filename.replace('.txt', '.wav')
|
| 854 |
import shutil
|
| 855 |
try:
|
| 856 |
if os.path.exists(filename):
|
|
|
|
| 991 |
|
| 992 |
# Llama versus GPT Battle!
|
| 993 |
all=""
|
| 994 |
+
# try:
|
| 995 |
+
#st.write('🔍Running with Llama.')
|
| 996 |
+
# response = StreamLLMChatResponse(file_contents)
|
| 997 |
+
#filename = generate_filename(user_prompt, "md")
|
| 998 |
+
# create_file(filename, file_contents, response, should_save)
|
| 999 |
+
#all=response
|
| 1000 |
#SpeechSynthesis(response)
|
| 1001 |
+
# except:
|
| 1002 |
+
# st.markdown('Llama is sleeping. Restart ETA 30 seconds.')
|
| 1003 |
|
| 1004 |
# gpt
|
| 1005 |
try:
|