Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,13 @@ if user_input:
|
|
44 |
|
45 |
# Generate response from chatbot
|
46 |
context = [msg['content'] for msg in st.session_state.messages]
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
# Add assistant response to chat history
|
50 |
st.session_state.messages.append({"role": "assistant", "content": response})
|
|
|
44 |
|
45 |
# Generate response from chatbot
|
46 |
context = [msg['content'] for msg in st.session_state.messages]
|
47 |
+
messages = [
|
48 |
+
{"role": "system", "content": "You are a helpful assistant named Digital Ink. Your purpose is to provide creative engaging and effective marketing content.You can introduce your self as follows: I'm Digital Ink, a marketing content generation model. I'm designed to assist you in creating engaging and effective marketing content, such as blog posts, social media posts, and product descriptions"},
|
49 |
+
{"role": "user", "content": user_input},
|
50 |
+
{"role": "assistant", "content": ""},
|
51 |
+
{"role": "user", "content": ""},
|
52 |
+
]
|
53 |
+
response = chat_pipeline(messages, **generation_args)[0]['generated_text']
|
54 |
|
55 |
# Add assistant response to chat history
|
56 |
st.session_state.messages.append({"role": "assistant", "content": response})
|