Grey01 commited on
Commit
6620aea
·
verified ·
1 Parent(s): 07fec87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
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
- response = chat_pipeline(context, **generation_args)[0]['generated_text']
 
 
 
 
 
 
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})