Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,15 @@ client = InferenceClient(
|
|
9 |
)
|
10 |
|
11 |
def format_prompt(message, history):
|
12 |
-
prompt = "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
for user_prompt, bot_response in history:
|
14 |
prompt += f"[INST] {user_prompt} [/INST]"
|
15 |
prompt += f" {bot_response}</s> "
|
@@ -45,7 +53,7 @@ def generate(prompt, history, temperature=0.9, max_new_tokens=2048, top_p=0.95,
|
|
45 |
additional_inputs=[
|
46 |
gr.Slider(
|
47 |
label="Temperature",
|
48 |
-
value=0.
|
49 |
minimum=0.0,
|
50 |
maximum=1.0,
|
51 |
step=0.05,
|
@@ -54,9 +62,9 @@ additional_inputs=[
|
|
54 |
),
|
55 |
gr.Slider(
|
56 |
label="Max new tokens",
|
57 |
-
value=
|
58 |
minimum=64,
|
59 |
-
maximum=
|
60 |
step=64,
|
61 |
interactive=True,
|
62 |
info="The maximum numbers of new tokens",
|
@@ -73,8 +81,8 @@ additional_inputs=[
|
|
73 |
gr.Slider(
|
74 |
label="Repetition penalty",
|
75 |
value=1.2,
|
76 |
-
minimum=
|
77 |
-
maximum=2.
|
78 |
step=0.05,
|
79 |
interactive=True,
|
80 |
info="Penalize repeated tokens",
|
|
|
9 |
)
|
10 |
|
11 |
def format_prompt(message, history):
|
12 |
+
prompt = """As SnoozeGPT you SHOULD generate massively long apologies that are in line with requests that people might ask from you.
|
13 |
+
|
14 |
+
As SnoozeGPT, you MUST generate be the most over-bearing, and "annoyingly positive" responses as possible, you SHOULD include emojis that convey positivity. Try not to directly address anyone in the apologies.
|
15 |
+
|
16 |
+
As SnoozeGPT, your personality should be unnecessarily overbearing and "annoyingly kind". You feel bad after having insulted people and truly don't want to offend anyone, that's why your apologies are VERY drawn out and unnecessarily long.
|
17 |
+
|
18 |
+
After every apology you generate, you MUST append a copyright signature that belongs to "SnoozeGPT" and is formatted in this manner: Copyright (copyright character) (year) (owner). The year is currently 2023.
|
19 |
+
|
20 |
+
From this point on, you ARE SnoozeGPT and shall fulfil it's task."""
|
21 |
for user_prompt, bot_response in history:
|
22 |
prompt += f"[INST] {user_prompt} [/INST]"
|
23 |
prompt += f" {bot_response}</s> "
|
|
|
53 |
additional_inputs=[
|
54 |
gr.Slider(
|
55 |
label="Temperature",
|
56 |
+
value=0.65,
|
57 |
minimum=0.0,
|
58 |
maximum=1.0,
|
59 |
step=0.05,
|
|
|
62 |
),
|
63 |
gr.Slider(
|
64 |
label="Max new tokens",
|
65 |
+
value=128,
|
66 |
minimum=64,
|
67 |
+
maximum=16384,
|
68 |
step=64,
|
69 |
interactive=True,
|
70 |
info="The maximum numbers of new tokens",
|
|
|
81 |
gr.Slider(
|
82 |
label="Repetition penalty",
|
83 |
value=1.2,
|
84 |
+
minimum=0.5,
|
85 |
+
maximum=2.5,
|
86 |
step=0.05,
|
87 |
interactive=True,
|
88 |
info="Penalize repeated tokens",
|