Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
# ADD DISCLAIMERS
|
| 2 |
# AND LOGGING
|
| 3 |
-
|
| 4 |
|
| 5 |
import gradio as gr
|
| 6 |
import os
|
|
@@ -33,6 +33,9 @@ Likes: thinking and learning, building stuff, interesting conversations, red hot
|
|
| 33 |
Traits: incredibly intelligent, funny, interesting, caffeine fiend, very ambitious, militant atheist, self-taught/homeschooled, casual
|
| 34 |
Aspirations: creating transhumanist utopia, understanding the universe more, becoming smarter and better\n"""
|
| 35 |
|
|
|
|
|
|
|
|
|
|
| 36 |
your_name = "elijah"
|
| 37 |
custom_template = \
|
| 38 |
f"{{% if {'sys_prompt' in locals()} %}}"\
|
|
@@ -51,6 +54,11 @@ custom_template = \
|
|
| 51 |
|
| 52 |
tokenizer.chat_template = custom_template
|
| 53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
def respond(
|
| 56 |
message,
|
|
@@ -60,7 +68,9 @@ def respond(
|
|
| 60 |
mirostat_tau,
|
| 61 |
mirostat_eta,
|
| 62 |
):
|
| 63 |
-
|
|
|
|
|
|
|
| 64 |
for val in history:
|
| 65 |
if val[0]:
|
| 66 |
messages.append({"role": "user", "content": val[0]})
|
|
|
|
| 1 |
# ADD DISCLAIMERS
|
| 2 |
# AND LOGGING
|
| 3 |
+
# Q: why is this model so fucking slow? A: because i'm not made of money
|
| 4 |
|
| 5 |
import gradio as gr
|
| 6 |
import os
|
|
|
|
| 33 |
Traits: incredibly intelligent, funny, interesting, caffeine fiend, very ambitious, militant atheist, self-taught/homeschooled, casual
|
| 34 |
Aspirations: creating transhumanist utopia, understanding the universe more, becoming smarter and better\n"""
|
| 35 |
|
| 36 |
+
|
| 37 |
+
presets
|
| 38 |
+
|
| 39 |
your_name = "elijah"
|
| 40 |
custom_template = \
|
| 41 |
f"{{% if {'sys_prompt' in locals()} %}}"\
|
|
|
|
| 54 |
|
| 55 |
tokenizer.chat_template = custom_template
|
| 56 |
|
| 57 |
+
presets = {
|
| 58 |
+
"emojis" : [{"role": "user", "content": "Wait I like you so much more when you use emojis more, keep doing it 😂"}, {"role": "assistant", "content": "Ummm, ok, looks like i'll be using more emojis 💀"}],
|
| 59 |
+
"none" : []
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
|
| 63 |
def respond(
|
| 64 |
message,
|
|
|
|
| 68 |
mirostat_tau,
|
| 69 |
mirostat_eta,
|
| 70 |
):
|
| 71 |
+
preset = "emojis"
|
| 72 |
+
|
| 73 |
+
messages = presets[preset]
|
| 74 |
for val in history:
|
| 75 |
if val[0]:
|
| 76 |
messages.append({"role": "user", "content": val[0]})
|