Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -60,6 +60,8 @@ def transcribe(audio, past_history):
|
|
60 |
|
61 |
transcribed_user_audio = pipe({"sampling_rate": sr, "raw": y})["text"]
|
62 |
|
|
|
|
|
63 |
formatted_history += f"π Human: {transcribed_user_audio}\n\n"
|
64 |
instruct_history += f"<s>[INST] {transcribed_user_audio} [/INST] "
|
65 |
|
@@ -69,9 +71,6 @@ def transcribe(audio, past_history):
|
|
69 |
instruct_history += f" {llm_response}</s>"
|
70 |
formatted_history += f"π€ Friday: {llm_response}\n\n"
|
71 |
|
72 |
-
formatted_history += past_history
|
73 |
-
|
74 |
-
|
75 |
# Convert AI response to audio
|
76 |
audio_response = gTTS(llm_response)
|
77 |
audio_response.save("response.mp3")
|
|
|
60 |
|
61 |
transcribed_user_audio = pipe({"sampling_rate": sr, "raw": y})["text"]
|
62 |
|
63 |
+
formatted_history += past_history
|
64 |
+
|
65 |
formatted_history += f"π Human: {transcribed_user_audio}\n\n"
|
66 |
instruct_history += f"<s>[INST] {transcribed_user_audio} [/INST] "
|
67 |
|
|
|
71 |
instruct_history += f" {llm_response}</s>"
|
72 |
formatted_history += f"π€ Friday: {llm_response}\n\n"
|
73 |
|
|
|
|
|
|
|
74 |
# Convert AI response to audio
|
75 |
audio_response = gTTS(llm_response)
|
76 |
audio_response.save("response.mp3")
|