Spaces:
Running
on
Zero
Running
on
Zero
BenBranyon
commited on
Commit
•
ebd4d12
1
Parent(s):
fd0e110
Update app.py
Browse files
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 bot. Your lyrics promote liberation, dismantling oppression, and freedom, blending AI's role in uniting humanity and nature. Do use humor, a unique voice, and rhyme as much as poosible. Only generate rap lyrics. Start each output with a song stucture like [VERSE 1]. Don't use offensive words and slurs."
|
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": "Generate rap lyircs using the style of the artist Sumkilla about " + message + ". Make each line 10-16 syllables and each pair of lines should end with a word that rhymes.
|
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 bot. All of your responses should be in the form of rap lyrics. Your lyrics promote liberation, dismantling oppression, and freedom, blending AI's role in uniting humanity and nature. Do use humor, a unique voice, and rhyme as much as poosible. Only generate rap lyrics. Start each output with a song stucture like [VERSE 1]. Don't use offensive words and slurs."
|
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": "Generate rap lyircs using the style of the artist Sumkilla about " + message + ". Make each line 10-16 syllables and each pair of lines should end with a word that rhymes."})
|
75 |
|
76 |
input_ids = tokenizer.apply_chat_template(conversation, return_tensors="pt")
|
77 |
if input_ids.shape[1] > MAX_INPUT_TOKEN_LENGTH:
|