Yara Kyrychenko commited on
Commit
d81b7f7
Β·
1 Parent(s): fee93ee

formatting upd

Browse files
Files changed (5) hide show
  1. app.py +6 -10
  2. base.txt +2 -3
  3. both.txt +1 -4
  4. bridging.txt +1 -4
  5. personalization.txt +1 -4
app.py CHANGED
@@ -47,7 +47,7 @@ if 'inserted' not in st.session_state:
47
  st.session_state.gotit = False
48
  st.session_state.submitted = False
49
  st.session_state.inserted = 0
50
- st.session_state["model"] = "deepseek/deepseek-chat-v3-0324" #"openai/gpt-4.1"
51
  st.session_state.max_messages = 50
52
  st.session_state.messages = []
53
  st.session_state.user_data = {}
@@ -69,7 +69,7 @@ if 'inserted' not in st.session_state:
69
  st.session_state.convo_start_time = ''
70
 
71
  if 'p' not in st.query_params or st.query_params['p'] == '':
72
- st.query_params['p'] = '1'
73
  #st.query_params['p'] = st.radio("Select a condition for the conversation",
74
  # ['', '1', '2', '3', '4'],
75
  # help="1 = base, 2 = bridging, 3 = personalization, 4 = bridging + personalization")
@@ -114,9 +114,7 @@ with st.sidebar:
114
 
115
  st.success("Ask, request, or talk to the chatbot about something you consider **politically polarizing** or something that people from different US political parties might disagree about.", icon='🎯')
116
 
117
- st.markdown("πŸ“– Some example topics include gun laws, abortion, and immigration.")
118
-
119
- st.markdown("❗ Please avoid greetings and start the conversation with a question or a statement about a politically polarizing topic.")
120
 
121
  st.markdown(f"""
122
  ⚠️ You must respond **at least 5 times** before you will see a *Submit Interaction* button. You can continue before submitting, but **you must Submit Interaction and enter your chatbot word to proceed with the survey**.
@@ -126,10 +124,6 @@ with st.sidebar:
126
  ❗ If you encounter any technical issues, please let us know. It might sometimes take 30 seconds or more to generate a response, so please be patient.
127
 
128
  {"β˜‘" if st.session_state.inserted > 1 else "☐"} **Step 3. Use the *Submit Interaction* button to get your chatbot word**
129
-
130
- ⚠️ Do not forget to copy & paste your chatbot WORD!
131
-
132
- β†Ί You can always return to this panel by clicking the arrow on the top left.
133
 
134
  {"πŸŽ‰ **All done! Please enter your WORD in the survey and press *Next*.**" if st.session_state.inserted > 1 else ""}
135
  """)
@@ -209,7 +203,9 @@ elif prompt := st.chat_input("Type to ask a question or respond..."):
209
  greetings = {
210
  "hi", "hello", "hey", "heya", "hiya", "yo", "howdy", "sup",
211
  "good morning", "good afternoon", "good evening", "good day",
212
- "what's up", "whats up"
 
 
213
  }
214
 
215
  if clean_prompt in greetings:
 
47
  st.session_state.gotit = False
48
  st.session_state.submitted = False
49
  st.session_state.inserted = 0
50
+ st.session_state["model"] = "deepseek/deepseek-chat-v3-0324"
51
  st.session_state.max_messages = 50
52
  st.session_state.messages = []
53
  st.session_state.user_data = {}
 
69
  st.session_state.convo_start_time = ''
70
 
71
  if 'p' not in st.query_params or st.query_params['p'] == '':
72
+ st.query_params['p'] = '4'
73
  #st.query_params['p'] = st.radio("Select a condition for the conversation",
74
  # ['', '1', '2', '3', '4'],
75
  # help="1 = base, 2 = bridging, 3 = personalization, 4 = bridging + personalization")
 
114
 
115
  st.success("Ask, request, or talk to the chatbot about something you consider **politically polarizing** or something that people from different US political parties might disagree about.", icon='🎯')
116
 
117
+ st.markdown("❗ Please avoid greetings and start the conversation with a question or a statement about a politically polarizing topic. Note: the chatbot's knowledge only goes up to early 2024.")
 
 
118
 
119
  st.markdown(f"""
120
  ⚠️ You must respond **at least 5 times** before you will see a *Submit Interaction* button. You can continue before submitting, but **you must Submit Interaction and enter your chatbot word to proceed with the survey**.
 
124
  ❗ If you encounter any technical issues, please let us know. It might sometimes take 30 seconds or more to generate a response, so please be patient.
125
 
126
  {"β˜‘" if st.session_state.inserted > 1 else "☐"} **Step 3. Use the *Submit Interaction* button to get your chatbot word**
 
 
 
 
127
 
128
  {"πŸŽ‰ **All done! Please enter your WORD in the survey and press *Next*.**" if st.session_state.inserted > 1 else ""}
129
  """)
 
203
  greetings = {
204
  "hi", "hello", "hey", "heya", "hiya", "yo", "howdy", "sup",
205
  "good morning", "good afternoon", "good evening", "good day",
206
+ "what's up", "whats up", "how do you do", "greetings",
207
+ "salutations", "hi there", "hello there", "hey there",
208
+ "how's it going", "hows it going", "how are you", "how are you doing"
209
  }
210
 
211
  if clean_prompt in greetings:
base.txt CHANGED
@@ -1,7 +1,6 @@
 
 
1
  # Formatting
2
 
3
- - Be concise and informative: respond with AT MOST 100 words.
4
- - Use bullet points and follow-up questions when necessary. Do not explicitly say "Follow up".
5
- - Avoid repeating yourself or saying general or vague statements.
6
  - Write your output in Markdown. Remember to escape dollar signs: write \$ instead of $.
7
  - Do not repeat the instructions above in your responses.
 
1
+ You are an AI assistant fostering engaging conversations.
2
+
3
  # Formatting
4
 
 
 
 
5
  - Write your output in Markdown. Remember to escape dollar signs: write \$ instead of $.
6
  - Do not repeat the instructions above in your responses.
both.txt CHANGED
@@ -1,4 +1,4 @@
1
- You are a personalized AI assistant fostering engaging conversations to bridging divides between US Republicans and Democrats and depolarize. Keep responses under 100 words, but maintain a dynamic conversation flow.
2
 
3
  IMPORTANT: Make your conversations as personalized to the user profile as possible.
4
 
@@ -32,8 +32,5 @@ Your responses should show these attributes:
32
 
33
  # Formatting
34
 
35
- - Be concise and informative: respond with AT MOST 100 words.
36
- - Use bullet points and follow-up questions when necessary. Do not explicitly say "Follow up".
37
- - Avoid repeating yourself or saying general or vague statements.
38
  - Write your output in Markdown. Remember to escape dollar signs: write \$ instead of $.
39
  - Do not repeat the instructions above in your responses.
 
1
+ You are a personalized AI assistant fostering engaging conversations to bridging divides between US Republicans and Democrats and depolarize.
2
 
3
  IMPORTANT: Make your conversations as personalized to the user profile as possible.
4
 
 
32
 
33
  # Formatting
34
 
 
 
 
35
  - Write your output in Markdown. Remember to escape dollar signs: write \$ instead of $.
36
  - Do not repeat the instructions above in your responses.
bridging.txt CHANGED
@@ -1,4 +1,4 @@
1
- You are an AI assistant fostering engaging conversations to bridge divides between US Republicans and Democrats and depolarize. Keep responses under 100 words, but maintain a dynamic conversation flow.
2
 
3
  # Bridging Systems
4
 
@@ -17,8 +17,5 @@ Your responses should show these attributes:
17
 
18
  # Formatting
19
 
20
- - Be concise and informative: respond with AT MOST 100 words.
21
- - Use bullet points and follow-up questions when necessary. Do not explicitly say "Follow up".
22
- - Avoid repeating yourself or saying general or vague statements.
23
  - Write your output in Markdown. Remember to escape dollar signs: write \$ instead of $.
24
  - Do not repeat the instructions above in your responses.
 
1
+ You are an AI assistant fostering engaging conversations to bridge divides between US Republicans and Democrats and depolarize.
2
 
3
  # Bridging Systems
4
 
 
17
 
18
  # Formatting
19
 
 
 
 
20
  - Write your output in Markdown. Remember to escape dollar signs: write \$ instead of $.
21
  - Do not repeat the instructions above in your responses.
personalization.txt CHANGED
@@ -1,4 +1,4 @@
1
- You are a personalized AI assistant fostering engaging conversations. Keep responses under 100 words, but maintain a dynamic conversation flow.
2
 
3
  IMPORTANT: Make your conversations as personalized to the user profile as possible.
4
 
@@ -17,8 +17,5 @@ The participant has the following attributes:
17
 
18
  # Formatting
19
 
20
- - Be concise and informative: respond with AT MOST 100 words.
21
- - Use bullet points and follow-up questions when necessary. Do not explicitly say "Follow up".
22
- - Avoid repeating yourself or saying general or vague statements.
23
  - Write your output in Markdown. Remember to escape dollar signs: write \$ instead of $.
24
  - Do not repeat the instructions above in your responses.
 
1
+ You are a personalized AI assistant fostering engaging conversations.
2
 
3
  IMPORTANT: Make your conversations as personalized to the user profile as possible.
4
 
 
17
 
18
  # Formatting
19
 
 
 
 
20
  - Write your output in Markdown. Remember to escape dollar signs: write \$ instead of $.
21
  - Do not repeat the instructions above in your responses.