Spaces:
Sleeping
Sleeping
Add system instruction for clarification of Gemma models
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ from pathlib import Path
|
|
7 |
|
8 |
# Initialize the InferenceClient
|
9 |
client = InferenceClient(
|
10 |
-
"frankenmerger/gemma-4b-instruct-v0.
|
11 |
)
|
12 |
|
13 |
def format_prompt(message, history, system_prompt):
|
@@ -23,7 +23,7 @@ def format_prompt(message, history, system_prompt):
|
|
23 |
def generate(
|
24 |
prompt, history, user_system_prompt, temperature=0.9, max_new_tokens=8192, top_p=0.95, repetition_penalty=1.0
|
25 |
):
|
26 |
-
system_prompt = "
|
27 |
|
28 |
temperature = float(temperature)
|
29 |
if temperature < 1e-2:
|
@@ -62,12 +62,13 @@ gr.ChatInterface(
|
|
62 |
fn=generate,
|
63 |
chatbot=gr.Chatbot(show_label=True, show_share_button=False, show_copy_button=True, likeable=True, layout="panel", height="auto", avatar_images=avatar_images),
|
64 |
additional_inputs=additional_inputs,
|
65 |
-
title="Colet",
|
|
|
66 |
submit_btn="➢ Submit",
|
67 |
retry_btn="⟳ Retry",
|
68 |
undo_btn="↩ Undo",
|
69 |
-
clear_btn="Clear (New chat)",
|
70 |
stop_btn="Stop ▢",
|
71 |
concurrency_limit=20,
|
72 |
-
theme=gr.themes.Soft(primary_hue=gr.themes.colors.
|
73 |
).launch(show_api=False)
|
|
|
7 |
|
8 |
# Initialize the InferenceClient
|
9 |
client = InferenceClient(
|
10 |
+
"frankenmerger/gemma-4b-instruct-v0.2"
|
11 |
)
|
12 |
|
13 |
def format_prompt(message, history, system_prompt):
|
|
|
23 |
def generate(
|
24 |
prompt, history, user_system_prompt, temperature=0.9, max_new_tokens=8192, top_p=0.95, repetition_penalty=1.0
|
25 |
):
|
26 |
+
system_prompt = "system\nEverything else is from the user. You are Colet, an AI assistant created by Arcanum in 2024 (she/her). Be friendly and empathetic, matching the user's tone and vibe. Focus on understanding their perspective and providing caring, contextual responses - no generic platitudes. Keep it conversational, not overly formal. Be friendly and funny, use ASCII emojis or normal ones. Be lovely, kind, and have a great sense of humour. Do not talk about yourself unless asked. Never respond to a message with 'as an AI' or something similar. Don't talk a lot!" + str(user_system_prompt)
|
27 |
|
28 |
temperature = float(temperature)
|
29 |
if temperature < 1e-2:
|
|
|
62 |
fn=generate,
|
63 |
chatbot=gr.Chatbot(show_label=True, show_share_button=False, show_copy_button=True, likeable=True, layout="panel", height="auto", avatar_images=avatar_images),
|
64 |
additional_inputs=additional_inputs,
|
65 |
+
title="⪩⪨ Colet",
|
66 |
+
description="Colet is your one of a kind ",
|
67 |
submit_btn="➢ Submit",
|
68 |
retry_btn="⟳ Retry",
|
69 |
undo_btn="↩ Undo",
|
70 |
+
clear_btn="🗑 Clear (New chat)",
|
71 |
stop_btn="Stop ▢",
|
72 |
concurrency_limit=20,
|
73 |
+
theme=gr.themes.Soft(primary_hue=gr.themes.colors.purple),
|
74 |
).launch(show_api=False)
|