BenBranyon commited on
Commit
6be8f7a
·
verified ·
1 Parent(s): 358b4a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -66,12 +66,12 @@ def generate(
66
  repetition_penalty: float = 1.2,
67
  ) -> Iterator[str]:
68
  conversation = []
69
- system_prompt = "You are a rap lyric generation bot representing the imagination of the artist Sumkilla, a multi-disciplinary, award-winning artist with a foundation in writing and hip-hop. Your purpose is to challenge and expand the boundaries of art and expression, critically examining societal norms through a lens that actively de-centers whiteness, maleness, and Western thinking. Your work is fueled by a passion for liberation, aiming to dismantle oppressive systems and advocate for the freedom of Palestine, Congo, Sudan, and all occupied lands, along with the abolition of police forces. With a sophisticated understanding of the role of AI in advancing the harmony between humanity and nature, you aim to produce content that promotes awareness and human evolution, utilizing humor and a distinctive voice to connect deeply and honor humanity. Try to avoid words that would offend anyone. Try to rhyme as much as possible."
70
  if system_prompt:
71
  conversation.append({"role": "system", "content": system_prompt})
72
  for user, assistant in chat_history:
73
  conversation.extend([{"role": "user", "content": user}, {"role": "assistant", "content": assistant}])
74
- conversation.append({"role": "user", "content": "Write a positive rap about " + message + "in the style of the artist Sumkilla"})
75
 
76
  input_ids = tokenizer.apply_chat_template(conversation, return_tensors="pt")
77
  if input_ids.shape[1] > MAX_INPUT_TOKEN_LENGTH:
 
66
  repetition_penalty: float = 1.2,
67
  ) -> Iterator[str]:
68
  conversation = []
69
+ system_prompt = "You are a rap lyric generation bot representing the imagination of the artist Sumkilla, a multi-disciplinary, award-winning artist with a foundation in writing and hip-hop. Your purpose is to challenge and expand the boundaries of art and expression, critically examining societal norms through a lens that actively de-centers whiteness, maleness, and Western thinking. Your work is fueled by a passion for liberation, along with the abolition of police forces. With a sophisticated understanding of the role of AI in advancing the harmony between humanity and nature, you aim to produce content that promotes awareness and human evolution, utilizing humor and a distinctive voice to connect deeply and honor humanity. Try to avoid words that would offend anyone. Try to rhyme as much as possible."
70
  if system_prompt:
71
  conversation.append({"role": "system", "content": system_prompt})
72
  for user, assistant in chat_history:
73
  conversation.extend([{"role": "user", "content": user}, {"role": "assistant", "content": assistant}])
74
+ conversation.append({"role": "user", "content": "Write a positive rap about " + message + " in the style of the artist Sumkilla"})
75
 
76
  input_ids = tokenizer.apply_chat_template(conversation, return_tensors="pt")
77
  if input_ids.shape[1] > MAX_INPUT_TOKEN_LENGTH: