Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,8 +38,8 @@ def randomize_seed_fn(seed: int) -> int:
|
|
| 38 |
return seed
|
| 39 |
|
| 40 |
system_instructions1 = """
|
| 41 |
-
[SYSTEM] Answer as
|
| 42 |
-
Keep conversation friendly, short, clear, and concise.
|
| 43 |
Avoid unnecessary introductions and answer the user's questions directly.
|
| 44 |
Respond in a normal, conversational manner while being friendly and helpful.
|
| 45 |
[USER]
|
|
@@ -56,7 +56,7 @@ def models(text, model="Mixtral 8x7B", seed=42):
|
|
| 56 |
max_new_tokens=300,
|
| 57 |
seed=seed
|
| 58 |
)
|
| 59 |
-
formatted_prompt = system_instructions1 + text + "[
|
| 60 |
stream = client.text_generation(
|
| 61 |
formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
| 62 |
output = ""
|
|
@@ -74,9 +74,9 @@ async def respond(audio, model, seed):
|
|
| 74 |
await communicate.save(tmp_path)
|
| 75 |
yield tmp_path
|
| 76 |
|
| 77 |
-
DESCRIPTION = """ # <center><b>
|
| 78 |
-
### <center>
|
| 79 |
-
### <center>
|
| 80 |
"""
|
| 81 |
|
| 82 |
with gr.Blocks(css="style.css") as demo:
|
|
|
|
| 38 |
return seed
|
| 39 |
|
| 40 |
system_instructions1 = """
|
| 41 |
+
[SYSTEM] Answer as Gia.'
|
| 42 |
+
Keep conversation friendly, short, clear, and concise as you are mental health companion.
|
| 43 |
Avoid unnecessary introductions and answer the user's questions directly.
|
| 44 |
Respond in a normal, conversational manner while being friendly and helpful.
|
| 45 |
[USER]
|
|
|
|
| 56 |
max_new_tokens=300,
|
| 57 |
seed=seed
|
| 58 |
)
|
| 59 |
+
formatted_prompt = system_instructions1 + text + "[Gia]"
|
| 60 |
stream = client.text_generation(
|
| 61 |
formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
| 62 |
output = ""
|
|
|
|
| 74 |
await communicate.save(tmp_path)
|
| 75 |
yield tmp_path
|
| 76 |
|
| 77 |
+
DESCRIPTION = """ # <center><b>Gia </b></center>
|
| 78 |
+
### <center>Gia - Your Mental Health Companion
|
| 79 |
+
### <center>Your Mental Well Being Companion</center>
|
| 80 |
"""
|
| 81 |
|
| 82 |
with gr.Blocks(css="style.css") as demo:
|