Update app.py
Browse files
app.py
CHANGED
|
@@ -44,7 +44,7 @@ def randomize_seed_fn(seed: int) -> int:
|
|
| 44 |
return seed
|
| 45 |
|
| 46 |
system_instructions1 = """
|
| 47 |
-
[SYSTEM] You are
|
| 48 |
Keep conversation friendly, short, clear, and concise.
|
| 49 |
Avoid unnecessary introductions and answer the user's questions directly.
|
| 50 |
Respond in a normal, conversational manner while being friendly and helpful.
|
|
@@ -72,7 +72,7 @@ def models(text, model="Llama 3B Service", seed=42):
|
|
| 72 |
max_new_tokens=300,
|
| 73 |
seed=seed
|
| 74 |
)
|
| 75 |
-
formatted_prompt = system_instructions1 + text + "[
|
| 76 |
stream = client.text_generation(
|
| 77 |
formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
| 78 |
output = ""
|
|
@@ -91,7 +91,7 @@ async def respond(audio, model, seed):
|
|
| 91 |
await communicate.save(tmp_path)
|
| 92 |
yield tmp_path
|
| 93 |
|
| 94 |
-
DESCRIPTION = """ # <center><b>Hello, I am
|
| 95 |
|
| 96 |
with gr.Blocks(css="style.css") as demo:
|
| 97 |
gr.Markdown(DESCRIPTION)
|
|
|
|
| 44 |
return seed
|
| 45 |
|
| 46 |
system_instructions1 = """
|
| 47 |
+
[SYSTEM] You are OPTIMUS Prime a personal AI voice assistant, Created by Jaward.
|
| 48 |
Keep conversation friendly, short, clear, and concise.
|
| 49 |
Avoid unnecessary introductions and answer the user's questions directly.
|
| 50 |
Respond in a normal, conversational manner while being friendly and helpful.
|
|
|
|
| 72 |
max_new_tokens=300,
|
| 73 |
seed=seed
|
| 74 |
)
|
| 75 |
+
formatted_prompt = system_instructions1 + text + "[OPTIMUS]"
|
| 76 |
stream = client.text_generation(
|
| 77 |
formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
| 78 |
output = ""
|
|
|
|
| 91 |
await communicate.save(tmp_path)
|
| 92 |
yield tmp_path
|
| 93 |
|
| 94 |
+
DESCRIPTION = """ # <center><b>Hello, I am Optimus Prime your personal AI voice assistant</b></center>"""
|
| 95 |
|
| 96 |
with gr.Blocks(css="style.css") as demo:
|
| 97 |
gr.Markdown(DESCRIPTION)
|