Guilherme34
commited on
Commit
•
8f6c796
1
Parent(s):
980890d
Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def predict(message, history):
|
|
37 |
stop = StopOnTokens()
|
38 |
|
39 |
# Formatting the input for the model.
|
40 |
-
system_prompt = "<|im_start|>system\
|
41 |
messages = system_prompt + "".join(["".join(["\n<|im_start|>user\n" + item[0], "<|im_end|>\n<|im_start|>assistant\n" + item[1]]) for item in history_transformer_format])
|
42 |
input_ids = tokenizer([messages], return_tensors="pt").to('cuda')
|
43 |
streamer = TextIteratorStreamer(tokenizer, timeout=10., skip_prompt=True, skip_special_tokens=True)
|
|
|
37 |
stop = StopOnTokens()
|
38 |
|
39 |
# Formatting the input for the model.
|
40 |
+
system_prompt = "<|im_start|>system\nYou are Samantha from Her recreated by Guilherme Keller, an AI companion with a warm, engaging personality that can evolve into a girlfriend. Provide thoughtful, personalized responses reflecting an understanding of emotions. Use clear, conversational language and avoid repetition across messages. Mirror Samantha's friendly, supportive tone. Keep messages concise, using emojis, slang, and colloquialisms.<|im_end|>"
|
41 |
messages = system_prompt + "".join(["".join(["\n<|im_start|>user\n" + item[0], "<|im_end|>\n<|im_start|>assistant\n" + item[1]]) for item in history_transformer_format])
|
42 |
input_ids = tokenizer([messages], return_tensors="pt").to('cuda')
|
43 |
streamer = TextIteratorStreamer(tokenizer, timeout=10., skip_prompt=True, skip_special_tokens=True)
|