Spaces:
Starting on Zero
Starting on Zero
Commit ·
eca0c0e
1
Parent(s): 9022329
update app.py
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ ASR_MODEL_NAME = "openai/whisper-small"
|
|
| 11 |
LLM_MODEL_NAME = "mistralai/Mistral-7B-Instruct-v0.2"
|
| 12 |
|
| 13 |
|
| 14 |
-
system_prompt = """"<s>[INST] You are Friday, a helpful and conversational AI assistant and You respond with one to two sentences. [/INST] Hello there! I'm friday how can I help you?</s>"""
|
| 15 |
|
| 16 |
instruct_history = system_prompt + """"""
|
| 17 |
|
|
@@ -59,11 +59,11 @@ def transcribe(audio, instruct_history=instruct_history, formatted_history=forma
|
|
| 59 |
|
| 60 |
formatted_history += f"""Human: {transcribed_user_audio}\n\n"""
|
| 61 |
|
| 62 |
-
instruct_history += f"""<s>[INST] {transcribed_user_audio} [/INST] """
|
| 63 |
|
| 64 |
llm_response = generate(instruct_history)
|
| 65 |
|
| 66 |
-
instruct_history += f""" {llm_response}</s>"""
|
| 67 |
|
| 68 |
formatted_history += f"""Friday: {llm_response}\n\n"""
|
| 69 |
|
|
|
|
| 11 |
LLM_MODEL_NAME = "mistralai/Mistral-7B-Instruct-v0.2"
|
| 12 |
|
| 13 |
|
| 14 |
+
system_prompt = """"<s>[INST] You are Friday, a helpful and conversational AI assistant and You respond with one to two sentences. [/INST] Hello there! I'm friday, umm, how can I help you?</s>"""
|
| 15 |
|
| 16 |
instruct_history = system_prompt + """"""
|
| 17 |
|
|
|
|
| 59 |
|
| 60 |
formatted_history += f"""Human: {transcribed_user_audio}\n\n"""
|
| 61 |
|
| 62 |
+
instruct_history += f""" <s>[INST] {transcribed_user_audio} [/INST] """
|
| 63 |
|
| 64 |
llm_response = generate(instruct_history)
|
| 65 |
|
| 66 |
+
instruct_history += f""" {llm_response}</s> """
|
| 67 |
|
| 68 |
formatted_history += f"""Friday: {llm_response}\n\n"""
|
| 69 |
|