|
20 | 20 | },
|
21 | 21 | {
|
22 | 22 | "cell_type": "code",
|
23 |
| - "execution_count": 1, |
| 23 | + "execution_count": null, |
24 | 24 | "id": "89293f18-ab92-426e-abf4-249f3e17727d",
|
25 | 25 | "metadata": {},
|
26 | 26 | "outputs": [],
|
|
32 | 32 | "from jupyter_mentor.student_profile import StudentProfile\n",
|
33 | 33 | "from jupyter_mentor.educator_course_overview import EducatorCourseOverview\n",
|
34 | 34 | "from jupyter_mentor.student_course_overview import StudentCourseOverview\n",
|
35 |
| - "from jupyter_mentor.chatbot_tab import ChatBot, ChatBotModel, StudentChatBot, EducatorChatBot\n", |
| 35 | + "from jupyter_mentor.chatbot_tab import ChatBot, ChatBotModel\n", |
36 | 36 | "from jupyter_mentor.file_viewer import FileViewerView"
|
37 | 37 | ]
|
38 | 38 | },
|
39 | 39 | {
|
40 | 40 | "cell_type": "code",
|
41 |
| - "execution_count": 2, |
| 41 | + "execution_count": null, |
42 | 42 | "id": "af80f333-81cd-4f2d-8f92-195b79a8e307",
|
43 | 43 | "metadata": {},
|
44 | 44 | "outputs": [],
|
|
55 | 55 | },
|
56 | 56 | {
|
57 | 57 | "cell_type": "code",
|
58 |
| - "execution_count": 3, |
| 58 | + "execution_count": null, |
59 | 59 | "id": "d25ddd77-b1e3-41e6-9254-686a04ee7633",
|
60 | 60 | "metadata": {},
|
61 | 61 | "outputs": [],
|
62 | 62 | "source": [
|
63 |
| - "madlibs_list = [\n", |
64 |
| - " {'name': 'Open Prompt',\n", |
65 |
| - " 'description': '',\n", |
66 |
| - " 'variables': {\n", |
67 |
| - " 'input_text': 'value'\n", |
68 |
| - " }, \n", |
69 |
| - " 'template': '{input_text}' ,\n", |
70 |
| - " 'placeholder': 'Message AI chatbot...',\n", |
71 |
| - " },\n", |
72 |
| - " {\n", |
73 |
| - " 'name': 'Metaphor',\n", |
74 |
| - " 'variables': {\n", |
75 |
| - " 'concept': 'value'\n", |
76 |
| - " }, \n", |
77 |
| - " 'template': \"I'm having trouble understanding {concept}. Explain it as a metaphor\",\n", |
78 |
| - " 'description': \"I'm having trouble understanding...\", \n", |
79 |
| - " 'placeholder': 'why the sky is blue'\n", |
| 63 | + "student_madlibs = [\n", |
| 64 | + " { 'name': 'Open Prompt',\n", |
| 65 | + " 'template': '{input_text}',\n", |
| 66 | + " 'variables': ['input_text'],\n", |
| 67 | + " 'descriptions': [''],\n", |
| 68 | + " 'placeholders': ['Message AI chatbot...']\n", |
| 69 | + " }, {'name': 'Metaphor',\n", |
| 70 | + " 'template': \"I'm having trouble understanding {concept}. Please explain it as a metaphor\",\n", |
| 71 | + " 'variables': ['concept'],\n", |
| 72 | + " 'descriptions': [\"I'm having trouble understanding\"],\n", |
| 73 | + " 'placeholders': ['']\n", |
| 74 | + " }, {'name': 'Step-by-Step',\n", |
| 75 | + " 'template': \"I'm having trouble understanding {concept}. Please help me break it down into steps.\",\n", |
| 76 | + " 'variables': ['concept'],\n", |
| 77 | + " 'descriptions': [\"I'm having trouble understanding\"],\n", |
| 78 | + " 'placeholders': ['']\n", |
| 79 | + " }, {'name': 'Debate Partner',\n", |
| 80 | + " 'template': \"I want to debate about {concept}. Let's use the Socratic method. You are subject matter expert who is trying to convince me about it. You will speak first and then wait for me to respond.\",\n", |
| 81 | + " 'variables': ['concept'],\n", |
| 82 | + " 'descriptions': [\"I want to debate about\"],\n", |
| 83 | + " 'placeholders': ['']\n", |
| 84 | + " }\n", |
| 85 | + "]" |
| 86 | + ] |
| 87 | + }, |
| 88 | + { |
| 89 | + "cell_type": "code", |
| 90 | + "execution_count": null, |
| 91 | + "id": "19a93c82-481e-4e50-8e88-85f37b964d3d", |
| 92 | + "metadata": {}, |
| 93 | + "outputs": [], |
| 94 | + "source": [ |
| 95 | + "educator_madlibs = [\n", |
| 96 | + " { 'name': 'Open Prompt',\n", |
| 97 | + " 'template': '{input_text}',\n", |
| 98 | + " 'variables': ['input_text'],\n", |
| 99 | + " 'descriptions': [''],\n", |
| 100 | + " 'placeholders': ['Message AI chatbot...']\n", |
| 101 | + " }, {'name': 'Metaphor',\n", |
| 102 | + " 'template': \"I'm having trouble understanding {concept}. Please explain it as a metaphor\",\n", |
| 103 | + " 'variables': ['concept'],\n", |
| 104 | + " 'descriptions': [\"I'm having trouble understanding\"],\n", |
| 105 | + " 'placeholders': ['']\n", |
| 106 | + " }, {'name': 'Translate',\n", |
| 107 | + " 'template': \"Help me translate the following text into {language}: {text}\",\n", |
| 108 | + " 'variables': ['language', 'text'],\n", |
| 109 | + " 'descriptions': [\"Text\", \"Language\"],\n", |
| 110 | + " 'placeholders': ['', '']\n", |
| 111 | + " }, {'name': 'Quiz Questions',\n", |
| 112 | + " 'template': \"Help me generate 10 quiz questions about {concept}.\",\n", |
| 113 | + " 'variables': ['concept'],\n", |
| 114 | + " 'descriptions': [\"Quiz Topic\"],\n", |
| 115 | + " 'placeholders': ['']\n", |
80 | 116 | " }\n",
|
81 | 117 | "]"
|
82 | 118 | ]
|
83 | 119 | },
|
84 | 120 | {
|
85 | 121 | "cell_type": "code",
|
86 |
| - "execution_count": 4, |
| 122 | + "execution_count": null, |
87 | 123 | "id": "ff4ce152-adef-4c60-828a-8bbf68129209",
|
88 | 124 | "metadata": {},
|
89 | 125 | "outputs": [],
|
|
96 | 132 | " \n",
|
97 | 133 | " # initialize models\n",
|
98 | 134 | " # self.model = DataModel(FILENAME)\n",
|
99 |
| - " self.educator_chatbot_model = ChatBotModel(madlibs_list)\n", |
| 135 | + " self.educator_chatbot_model = ChatBotModel(educator_madlibs)\n", |
100 | 136 | "\n",
|
101 | 137 | " \n",
|
102 | 138 | " # initialize views\n",
|
103 | 139 | " self.first = Login()\n",
|
104 | 140 | " self.second = EducatorProfileView()\n",
|
105 | 141 | " self.file_viewer = FileViewerView()\n",
|
106 |
| - " self.third = EducatorCourseOverview(self.file_viewer)\n", |
| 142 | + " self.third = EducatorCourseOverview()\n", |
107 | 143 | " self.fourth = ChatBot(self.educator_chatbot_model)\n",
|
108 | 144 | " \n",
|
109 | 145 | " # Add tabs to the Tab widget\n",
|
|
127 | 163 | " self.selected_index = 2\n",
|
128 | 164 | " \n",
|
129 | 165 | " def switch_to_fourth(self, button):\n",
|
130 |
| - " self.selected_index = 3\n", |
131 |
| - " " |
| 166 | + " self.selected_index = 3" |
132 | 167 | ]
|
133 | 168 | },
|
134 | 169 | {
|
135 | 170 | "cell_type": "code",
|
136 |
| - "execution_count": 5, |
| 171 | + "execution_count": null, |
137 | 172 | "id": "9ca28623-ed1f-4f1c-b671-462ee582040f",
|
138 | 173 | "metadata": {},
|
139 |
| - "outputs": [ |
140 |
| - { |
141 |
| - "data": { |
142 |
| - "application/vnd.jupyter.widget-view+json": { |
143 |
| - "model_id": "45777c8ce5e544ccb75ef60ea2d3f504", |
144 |
| - "version_major": 2, |
145 |
| - "version_minor": 0 |
146 |
| - }, |
147 |
| - "text/plain": [ |
148 |
| - "EducatorMain(children=(Login(children=(Container(children=[Html(attributes={'title': 'a title'}, children=['Lo…" |
149 |
| - ] |
150 |
| - }, |
151 |
| - "execution_count": 5, |
152 |
| - "metadata": {}, |
153 |
| - "output_type": "execute_result" |
154 |
| - } |
155 |
| - ], |
| 174 | + "outputs": [], |
156 | 175 | "source": [
|
157 | 176 | "educator_main = EducatorMain()\n",
|
158 | 177 | "educator_main"
|
159 | 178 | ]
|
160 | 179 | },
|
161 | 180 | {
|
162 | 181 | "cell_type": "code",
|
163 |
| - "execution_count": 8, |
| 182 | + "execution_count": null, |
164 | 183 | "id": "7548d87a-94e3-4cdc-bb20-fe46ec366425",
|
165 | 184 | "metadata": {},
|
166 | 185 | "outputs": [],
|
|
173 | 192 | " \n",
|
174 | 193 | " # initialize models\n",
|
175 | 194 | " # self.model = EducatorModel(FILENAME)\n",
|
176 |
| - " self.student_chatbot_model = ChatBotModel(madlibs_list)\n", |
| 195 | + " self.student_chatbot_model = ChatBotModel(student_madlibs)\n", |
177 | 196 | "\n",
|
178 | 197 | " # initialize views\n",
|
179 | 198 | " self.first = Login()\n",
|
180 | 199 | " self.second = StudentProfile()\n",
|
181 | 200 | " self.file_viewer = FileViewerView()\n",
|
182 |
| - " #self.third = StudentCourseOverview(self.file_viewer\n", |
183 | 201 | " self.third = StudentCourseOverview()\n",
|
184 | 202 | " self.fourth = ChatBot(self.student_chatbot_model)\n",
|
185 | 203 | "\n",
|
|
190 | 208 | " self.set_title(0, 'LogIn')\n",
|
191 | 209 | " self.set_title(1, 'User Profile')\n",
|
192 | 210 | " self.set_title(2, 'Course Overview')\n",
|
193 |
| - " self.set_title(3, 'Student Chatbox')\n", |
| 211 | + " self.set_title(3, 'Test/Assn Generator')\n", |
194 | 212 | "\n",
|
195 | 213 | "\n",
|
196 | 214 | " # Add event handlers to \"Next\" buttons in each tab\n",
|
|
210 | 228 | },
|
211 | 229 | {
|
212 | 230 | "cell_type": "code",
|
213 |
| - "execution_count": 9, |
| 231 | + "execution_count": null, |
214 | 232 | "id": "36cabf8d-427b-4d24-9c5d-8a6f8e4ab6b5",
|
215 | 233 | "metadata": {},
|
216 |
| - "outputs": [ |
217 |
| - { |
218 |
| - "data": { |
219 |
| - "application/vnd.jupyter.widget-view+json": { |
220 |
| - "model_id": "5ba5c5efdcdb42fa8efc2fcc9c77d2b5", |
221 |
| - "version_major": 2, |
222 |
| - "version_minor": 0 |
223 |
| - }, |
224 |
| - "text/plain": [ |
225 |
| - "StudentMain(children=(Login(children=(Container(children=[Html(attributes={'title': 'a title'}, children=['Log…" |
226 |
| - ] |
227 |
| - }, |
228 |
| - "execution_count": 9, |
229 |
| - "metadata": {}, |
230 |
| - "output_type": "execute_result" |
231 |
| - } |
232 |
| - ], |
| 234 | + "outputs": [], |
233 | 235 | "source": [
|
234 | 236 | "student_main = StudentMain()\n",
|
235 | 237 | "student_main"
|
|
257 | 259 | ],
|
258 | 260 | "metadata": {
|
259 | 261 | "kernelspec": {
|
260 |
| - "display_name": "Python 3 (ipykernel)", |
| 262 | + "display_name": "python3", |
261 | 263 | "language": "python",
|
262 | 264 | "name": "python3"
|
263 |
| - }, |
264 |
| - "language_info": { |
265 |
| - "codemirror_mode": { |
266 |
| - "name": "ipython", |
267 |
| - "version": 3 |
268 |
| - }, |
269 |
| - "file_extension": ".py", |
270 |
| - "mimetype": "text/x-python", |
271 |
| - "name": "python", |
272 |
| - "nbconvert_exporter": "python", |
273 |
| - "pygments_lexer": "ipython3", |
274 |
| - "version": "3.8.19" |
275 | 265 | }
|
276 | 266 | },
|
277 | 267 | "nbformat": 4,
|
|
0 commit comments