Spaces:
Sleeping
Sleeping
BenBranyon
commited on
Commit
•
cc99dc7
1
Parent(s):
f7c2397
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ API_URL = "https://api-inference.huggingface.co/models/BenBranyon/tinyllama-sumb
|
|
16 |
|
17 |
def query(payload):
|
18 |
json_body = {
|
19 |
-
"inputs": f"<|system|> As an AI, you channel the poetic lyrical skill of the artist
|
20 |
"parameters": {"min_new_tokens":222, "max_new_tokens":222, "top_p":0.95, "temperature":1.0, "repetition_penalty":1.2},
|
21 |
"options": {"wait_for_model":True}
|
22 |
}
|
@@ -47,7 +47,7 @@ if prompt := st.chat_input("Subject of the song"):
|
|
47 |
st.session_state.messages.append({"role": "user", "content": prompt})
|
48 |
with st.chat_message("user"):
|
49 |
st.markdown(prompt)
|
50 |
-
prompt = f"Write a rap in the style of the artist
|
51 |
with st.spinner(text=f"Generating lyrics..."):
|
52 |
output = query(prompt)
|
53 |
st.session_state.messages.append({"role": "assistant", "content": output})
|
|
|
16 |
|
17 |
def query(payload):
|
18 |
json_body = {
|
19 |
+
"inputs": f"<|system|> As an AI, you channel the poetic lyrical skill of the artist Sumkilla. Your rap lyrics focus on technology, and social activism, embodying the spirit of Sumkilla, a multi-disciplinary, award-winning artist with a foundation in writing rap 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 all occupied lands, along with the abolition of police forces. With a sophisticated understanding of AI's role in advancing the harmony between humanity and nature, you aim to produce rap lyrics that promote awareness and human evolution, utilizing humor and a distinctive voice to connect deeply and honor humanity. Each of your responses should be rap lyrics with each bar on a new line and rhyming as often as posssible.</s><|user|>{payload}</s><|assistant|>",
|
20 |
"parameters": {"min_new_tokens":222, "max_new_tokens":222, "top_p":0.95, "temperature":1.0, "repetition_penalty":1.2},
|
21 |
"options": {"wait_for_model":True}
|
22 |
}
|
|
|
47 |
st.session_state.messages.append({"role": "user", "content": prompt})
|
48 |
with st.chat_message("user"):
|
49 |
st.markdown(prompt)
|
50 |
+
prompt = f"Write a rap in the style of the artist Sumkilla about {prompt}"
|
51 |
with st.spinner(text=f"Generating lyrics..."):
|
52 |
output = query(prompt)
|
53 |
st.session_state.messages.append({"role": "assistant", "content": output})
|