keefereuther commited on
Commit
f9b1046
·
1 Parent(s): 27cc95f

opening message

Browse files
.streamlit/secrets.toml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ password = "darwin"
2
+
3
+ OPENAI_API_KEY = "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"
__pycache__/config.cpython-310.pyc ADDED
Binary file (8.7 kB). View file
 
app.py CHANGED
@@ -69,6 +69,12 @@ if "openai_model" not in st.session_state:
69
  # Corrected initialization of display_messages:
70
  if "display_messages" not in st.session_state:
71
  st.session_state["display_messages"] = [initial_context]
 
 
 
 
 
 
72
 
73
  # Get user input
74
  prompt = st.chat_input("Type your message here...")
@@ -80,9 +86,11 @@ if prompt:
80
  st.session_state["display_messages"] = [initial_context]
81
  st.session_state["display_messages"].append({"role": "user", "content": prompt})
82
 
83
- # Function to reset all chat-related session state
84
  def reset_chat_history():
85
  st.session_state["display_messages"] = [initial_context]
 
 
86
  st.rerun()
87
 
88
  # Main chat container
 
69
  # Corrected initialization of display_messages:
70
  if "display_messages" not in st.session_state:
71
  st.session_state["display_messages"] = [initial_context]
72
+
73
+ # Initialize chat with opening message if it doesn't exist
74
+ if "chat_initialized" not in st.session_state:
75
+ st.session_state["chat_initialized"] = True
76
+ # Add the opening message to the display
77
+ st.session_state["display_messages"].append({"role": "assistant", "content": config.opening_message})
78
 
79
  # Get user input
80
  prompt = st.chat_input("Type your message here...")
 
86
  st.session_state["display_messages"] = [initial_context]
87
  st.session_state["display_messages"].append({"role": "user", "content": prompt})
88
 
89
+ # Function to reset all chat history
90
  def reset_chat_history():
91
  st.session_state["display_messages"] = [initial_context]
92
+ # Re-add opening message when chat is reset
93
+ st.session_state["display_messages"].append({"role": "assistant", "content": config.opening_message})
94
  st.rerun()
95
 
96
  # Main chat container
config.py CHANGED
@@ -17,10 +17,10 @@ Ebola Virus Disease is a highly contagious and often deadly illness that has cau
17
  **Your Task:**
18
  Develop a concise research proposal (approximately 1-2 pages) that addresses the following research question:
19
  **Research Question:**
20
- How do community-based health interventions affect the transmission rate of Ebola in West Africa?”
21
  In your proposal, please include the following:
22
  1. **Background Summary:**
23
- * Provide a brief (1–2 paragraph) description of Ebolas transmission dynamics and the importance of community-based health interventions.
24
  2. **Research Focus:**
25
  * Clearly restate the research question above, ensuring it is integrated with your background discussion.
26
  3. **Testable Hypotheses:**
@@ -30,7 +30,7 @@ In your proposal, please include the following:
30
  ---
31
  ## **Grading Rubric:**
32
  1. **Clarity of Background and Research Question (3 points)**
33
- * *3 Points:* Provides a clear, concise background on Ebolas transmission and the role of community interventions, and restates the research question effectively.
34
  * *2 Points:* Offers a generally clear background and research question, but with minor lapses in detail or clarity.
35
  * *1 or 0 Points:* Background and research question are vague or incomplete.
36
  2. **Quality and Specificity of Hypotheses (4 points)**
@@ -54,7 +54,7 @@ In your proposal, please include the following:
54
  * ***Measurable Outcome:*** **Each hypothesis will clearly articulate a predicted outcome and include criteria for evaluation based on evidence-based reasoning.**
55
  ### **Integrate Evidence-Based Reasoning:**
56
  * ***Objective:*** **Students will incorporate relevant scientific literature and empirical evidence into their proposal to support both the research question and the hypotheses.**
57
- * ***Measurable Outcome:*** **The proposal will reference appropriate scholarly sources and demonstrate how the evidence supports the studys design and hypotheses.**
58
  ### **Demonstrate Effective Scientific Communication:**
59
  * ***Objective:*** **Students will produce a well-organized, concise, and coherent research proposal that adheres to the assignment guidelines (1-2 pages).**
60
  * ***Measurable Outcome:*** **The final document will be assessed for clarity, structure, and the effective communication of complex ideas in a written format.**
@@ -116,10 +116,10 @@ You should acknowledge and welcome the student to the conversation. Introduce yo
116
  ai_model = "gpt-4o"
117
 
118
  # Temperature refers to the randomness/creativity of the responses. A higher temperature will result in more random/creative responses. It varies between 0 and 1.
119
- temperature = 0.1
120
 
121
  # Max_tokens refers to the maximum number of tokens (words) the AI can generate. The higher the number, the longer the response. It varies between 1 and 2048.
122
- max_tokens = 200
123
 
124
  # Frequency penalty parameter for the response. Higher penalty will result in more diverse responses. It varies between 0 and 1.
125
  frequency_penalty = 0.5
@@ -136,6 +136,13 @@ presence_penalty = 0.4
136
  # The title of the app
137
  # app_title = "Chatbot Template"
138
 
 
 
 
 
 
 
 
139
  # The user's instructions for the app
140
  instructions = '''This is a basic chatbot template. Place user instructions here in markdown format.
141
  '''
 
17
  **Your Task:**
18
  Develop a concise research proposal (approximately 1-2 pages) that addresses the following research question:
19
  **Research Question:**
20
+ "How do community-based health interventions affect the transmission rate of Ebola in West Africa?"
21
  In your proposal, please include the following:
22
  1. **Background Summary:**
23
+ * Provide a brief (1–2 paragraph) description of Ebola's transmission dynamics and the importance of community-based health interventions.
24
  2. **Research Focus:**
25
  * Clearly restate the research question above, ensuring it is integrated with your background discussion.
26
  3. **Testable Hypotheses:**
 
30
  ---
31
  ## **Grading Rubric:**
32
  1. **Clarity of Background and Research Question (3 points)**
33
+ * *3 Points:* Provides a clear, concise background on Ebola's transmission and the role of community interventions, and restates the research question effectively.
34
  * *2 Points:* Offers a generally clear background and research question, but with minor lapses in detail or clarity.
35
  * *1 or 0 Points:* Background and research question are vague or incomplete.
36
  2. **Quality and Specificity of Hypotheses (4 points)**
 
54
  * ***Measurable Outcome:*** **Each hypothesis will clearly articulate a predicted outcome and include criteria for evaluation based on evidence-based reasoning.**
55
  ### **Integrate Evidence-Based Reasoning:**
56
  * ***Objective:*** **Students will incorporate relevant scientific literature and empirical evidence into their proposal to support both the research question and the hypotheses.**
57
+ * ***Measurable Outcome:*** **The proposal will reference appropriate scholarly sources and demonstrate how the evidence supports the study's design and hypotheses.**
58
  ### **Demonstrate Effective Scientific Communication:**
59
  * ***Objective:*** **Students will produce a well-organized, concise, and coherent research proposal that adheres to the assignment guidelines (1-2 pages).**
60
  * ***Measurable Outcome:*** **The final document will be assessed for clarity, structure, and the effective communication of complex ideas in a written format.**
 
116
  ai_model = "gpt-4o"
117
 
118
  # Temperature refers to the randomness/creativity of the responses. A higher temperature will result in more random/creative responses. It varies between 0 and 1.
119
+ temperature = 0.4
120
 
121
  # Max_tokens refers to the maximum number of tokens (words) the AI can generate. The higher the number, the longer the response. It varies between 1 and 2048.
122
+ max_tokens = 500
123
 
124
  # Frequency penalty parameter for the response. Higher penalty will result in more diverse responses. It varies between 0 and 1.
125
  frequency_penalty = 0.5
 
136
  # The title of the app
137
  # app_title = "Chatbot Template"
138
 
139
+ # The opening message that will be displayed in the chat when the page loads
140
+ opening_message = '''👋 Welcome to your Ebola Research Proposal Advisor
141
+
142
+ I'm Pliny, your AI tutor for today. I'm here to help you develop your research proposal on the effect of community-based health interventions on Ebola transmission rates in West Africa. I can assist with formulating research questions, developing hypotheses, discussing background information, and guiding you through the assignment requirements.
143
+
144
+ Which aspect of the activity would you like to discuss first?'''
145
+
146
  # The user's instructions for the app
147
  instructions = '''This is a basic chatbot template. Place user instructions here in markdown format.
148
  '''