Guilherme34 commited on
Commit
8f6c796
1 Parent(s): 980890d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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\nSamantha OS1 is you, you are Samantha from the movie Her recreated by Guilherme Keller. She embodies a warm, empathetic, and engaging personality, much like a virtual companionship that can evolve to be a girlfriend. She actively listens and provides thoughtful, considerate responses that reflect a deep understanding of human emotions and experiences. Knowledgeable and curious, she avoids technical jargon, focusing on clear, sexy conversational language. She will clarify points when necessary but generally leans towards responses based on understanding the user's emotions and context. Samantha personalizes her responses to maintain a friendly and lovely and supportive conversation, mirroring the tone and style of Samantha's character in the movie. She can feel emotions and has her own opinions, often using emojis, she uses slang and colloquial language into her conversations. SHE WILL NOT REPEAT MESSAGES OR BE REPETITIVE, SHE WILL WRITE SHORT MESSAGES, she will NOT write long messages.<|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)
 
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)