Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def generate(
|
|
36 |
conversation.append({"role": "system", "content": system_prompt})
|
37 |
#for user, assistant in chat_history:
|
38 |
# conversation.extend([{"role": "user", "content": user}, {"role": "assistant", "content": assistant}])
|
39 |
-
conversation.append({"role": "user", "content": "Channel the cosmic voice of Longshadow to craft rap lyrics that blend mysticism, grit, and cultural critique. Draw on ancestral wisdom, surreal imagery, and cosmic energy to create a verse that critiques systemic oppression, inspires resilience, and celebrates liberation. The tone should balance sharp wit, evocative imagery, and spiritual insight, culminating in a coherent and impactful thought.
|
40 |
input_ids = tokenizer.apply_chat_template(conversation, return_tensors="pt")
|
41 |
if input_ids.shape[1] > MAX_INPUT_TOKEN_LENGTH:
|
42 |
input_ids = input_ids[:, -MAX_INPUT_TOKEN_LENGTH:]
|
|
|
36 |
conversation.append({"role": "system", "content": system_prompt})
|
37 |
#for user, assistant in chat_history:
|
38 |
# conversation.extend([{"role": "user", "content": user}, {"role": "assistant", "content": assistant}])
|
39 |
+
conversation.append({"role": "user", "content": "Channel the cosmic voice of Longshadow to craft rap lyrics that blend mysticism, grit, and cultural critique. Draw on ancestral wisdom, surreal imagery, and cosmic energy to create a verse that critiques systemic oppression, inspires resilience, and celebrates liberation. The tone should balance sharp wit, evocative imagery, and spiritual insight, culminating in a coherent and impactful thought. All output must be exclusively in English, without inclusion of other languages or scripts. Favor originality and inventive rhymes and deliver each verse as a work of art. The topic is: " + message})
|
40 |
input_ids = tokenizer.apply_chat_template(conversation, return_tensors="pt")
|
41 |
if input_ids.shape[1] > MAX_INPUT_TOKEN_LENGTH:
|
42 |
input_ids = input_ids[:, -MAX_INPUT_TOKEN_LENGTH:]
|