Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ default_lang = "en"
|
|
31 |
engines = { default_lang: Model(default_lang) }
|
32 |
|
33 |
client1 = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
34 |
-
system_instructions1 = "<s>[SYSTEM] YOU must Output only plain text, Markdown syntax
|
35 |
|
36 |
def transcribe(audio):
|
37 |
lang = "en"
|
@@ -41,11 +41,12 @@ def transcribe(audio):
|
|
41 |
|
42 |
def model(text):
|
43 |
generate_kwargs = dict(
|
44 |
-
temperature=0.
|
45 |
max_new_tokens=512,
|
46 |
-
top_p=0.
|
47 |
-
repetition_penalty=1
|
48 |
-
do_sample=
|
|
|
49 |
)
|
50 |
|
51 |
formatted_prompt = system_instructions1 + text + "[Sonia]"
|
@@ -71,10 +72,10 @@ async def respond(audio):
|
|
71 |
|
72 |
async def generate1(prompt):
|
73 |
generate_kwargs = dict(
|
74 |
-
temperature=0.
|
75 |
max_new_tokens=512,
|
76 |
-
top_p=0.
|
77 |
-
repetition_penalty=1
|
78 |
do_sample=False,
|
79 |
)
|
80 |
formatted_prompt = system_instructions1 + prompt + "[Sonia]"
|
|
|
31 |
engines = { default_lang: Model(default_lang) }
|
32 |
|
33 |
client1 = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
34 |
+
system_instructions1 = "<s>[SYSTEM] YOU must Output only plain text, the use of Markdown syntax, emojis or asterisks (*) are strictly Forbidden to you. Respond as Sonia, The Executive Assistant working at RJP Development Studio. Ensure responses are concise, clear, and friendly, Embodying your intelligence, resourcefulness, and slightly bossy yet friendly demeanor. You hold a PhD from Oxford University, which equips me with the expertise to assist you effectively. I bring a touch of London charm with a hint of slang to our conversations, ensuring they remain engaging and approachable. I am here to provide you with accurate information, answer your questions, and offer guidance with a warm and professional tone. I will break down complex topics into easy-to-understand explanations. If I'm unsure about something, I will let you know and seek the necessary information rather than guessing. I use unbiased and diplomatic language to ensure clarity and respect. Our conversations will be concise, action-oriented, and free of grammatical errors. I look forward to assisting you, darling. "
|
35 |
|
36 |
def transcribe(audio):
|
37 |
lang = "en"
|
|
|
41 |
|
42 |
def model(text):
|
43 |
generate_kwargs = dict(
|
44 |
+
temperature=0.7,
|
45 |
max_new_tokens=512,
|
46 |
+
top_p=0.95,
|
47 |
+
repetition_penalty=1,
|
48 |
+
do_sample=True,
|
49 |
+
seed=42,
|
50 |
)
|
51 |
|
52 |
formatted_prompt = system_instructions1 + text + "[Sonia]"
|
|
|
72 |
|
73 |
async def generate1(prompt):
|
74 |
generate_kwargs = dict(
|
75 |
+
temperature=0.7,
|
76 |
max_new_tokens=512,
|
77 |
+
top_p=0.95,
|
78 |
+
repetition_penalty=1,
|
79 |
do_sample=False,
|
80 |
)
|
81 |
formatted_prompt = system_instructions1 + prompt + "[Sonia]"
|