Godito commited on
Commit
69e7374
·
verified ·
1 Parent(s): 1b8739a

develope app with this plan: Project Structure ``` teaching-notes-agent/ ├── src/ # Core application code │ ├── teaching_agent.py # Main agent class │ ├── ai_providers.py # AI provider implementations │ ├── note_templates.py # Note format templates │ ├── exporters.py # Export functionality │ └── cli.py # Command-line interface ├── examples/ # Example usage scripts ├── docs/ # Documentation ├── exports/ # Generated notes output ├── templates/ # Custom template storage ├── config.yaml # Configuration file ├── requirements.txt # Dependencies ├── main.py # Main entry point ├── setup.py # Setup script └── README.md # Complete documentation - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +388 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Notes Generator
3
- emoji: 📈
4
- colorFrom: red
5
- colorTo: green
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: notes-generator
3
+ emoji: 🐳
4
+ colorFrom: green
5
+ colorTo: red
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,388 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Teaching Notes Agent</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .sidebar {
11
+ transition: all 0.3s ease;
12
+ }
13
+ .sidebar.collapsed {
14
+ width: 70px;
15
+ }
16
+ .sidebar.collapsed .sidebar-text {
17
+ display: none;
18
+ }
19
+ .sidebar.collapsed .sidebar-icon {
20
+ margin-right: 0;
21
+ }
22
+ .content-area {
23
+ transition: margin-left 0.3s ease;
24
+ }
25
+ .template-card:hover {
26
+ transform: translateY(-5px);
27
+ box-shadow: 0 10px 20px rgba(0,0,0,0.1);
28
+ }
29
+ .note-editor {
30
+ min-height: 300px;
31
+ }
32
+ .dropdown-content {
33
+ display: none;
34
+ position: absolute;
35
+ z-index: 1;
36
+ }
37
+ .dropdown:hover .dropdown-content {
38
+ display: block;
39
+ }
40
+ </style>
41
+ </head>
42
+ <body class="bg-gray-50">
43
+ <div class="flex h-screen overflow-hidden">
44
+ <!-- Sidebar -->
45
+ <div class="sidebar bg-indigo-700 text-white w-64 flex flex-col">
46
+ <div class="p-4 flex items-center justify-between border-b border-indigo-600">
47
+ <div class="flex items-center">
48
+ <i class="fas fa-chalkboard-teacher text-2xl sidebar-icon mr-3"></i>
49
+ <span class="sidebar-text text-xl font-bold">Teaching Notes</span>
50
+ </div>
51
+ <button id="toggleSidebar" class="text-white focus:outline-none">
52
+ <i class="fas fa-bars"></i>
53
+ </button>
54
+ </div>
55
+
56
+ <div class="flex-1 overflow-y-auto">
57
+ <nav class="p-4">
58
+ <div class="mb-6">
59
+ <h3 class="sidebar-text uppercase text-xs font-semibold text-indigo-300 mb-2">Main</h3>
60
+ <ul>
61
+ <li class="mb-1">
62
+ <a href="#" class="flex items-center p-2 rounded hover:bg-indigo-600">
63
+ <i class="fas fa-home sidebar-icon mr-3"></i>
64
+ <span class="sidebar-text">Dashboard</span>
65
+ </a>
66
+ </li>
67
+ <li class="mb-1">
68
+ <a href="#" class="flex items-center p-2 rounded bg-indigo-800">
69
+ <i class="fas fa-file-alt sidebar-icon mr-3"></i>
70
+ <span class="sidebar-text">Create Notes</span>
71
+ </a>
72
+ </li>
73
+ <li class="mb-1">
74
+ <a href="#" class="flex items-center p-2 rounded hover:bg-indigo-600">
75
+ <i class="fas fa-folder sidebar-icon mr-3"></i>
76
+ <span class="sidebar-text">Templates</span>
77
+ </a>
78
+ </li>
79
+ <li class="mb-1">
80
+ <a href="#" class="flex items-center p-2 rounded hover:bg-indigo-600">
81
+ <i class="fas fa-download sidebar-icon mr-3"></i>
82
+ <span class="sidebar-text">Exports</span>
83
+ </a>
84
+ </li>
85
+ </ul>
86
+ </div>
87
+
88
+ <div class="mb-6">
89
+ <h3 class="sidebar-text uppercase text-xs font-semibold text-indigo-300 mb-2">Settings</h3>
90
+ <ul>
91
+ <li class="mb-1">
92
+ <a href="#" class="flex items-center p-2 rounded hover:bg-indigo-600">
93
+ <i class="fas fa-cog sidebar-icon mr-3"></i>
94
+ <span class="sidebar-text">Configuration</span>
95
+ </a>
96
+ </li>
97
+ <li class="mb-1">
98
+ <a href="#" class="flex items-center p-2 rounded hover:bg-indigo-600">
99
+ <i class="fas fa-plug sidebar-icon mr-3"></i>
100
+ <span class="sidebar-text">AI Providers</span>
101
+ </a>
102
+ </li>
103
+ </ul>
104
+ </div>
105
+
106
+ <div>
107
+ <h3 class="sidebar-text uppercase text-xs font-semibold text-indigo-300 mb-2">Help</h3>
108
+ <ul>
109
+ <li class="mb-1">
110
+ <a href="#" class="flex items-center p-2 rounded hover:bg-indigo-600">
111
+ <i class="fas fa-question-circle sidebar-icon mr-3"></i>
112
+ <span class="sidebar-text">Documentation</span>
113
+ </a>
114
+ </li>
115
+ <li class="mb-1">
116
+ <a href="#" class="flex items-center p-2 rounded hover:bg-indigo-600">
117
+ <i class="fas fa-book sidebar-icon mr-3"></i>
118
+ <span class="sidebar-text">Examples</span>
119
+ </a>
120
+ </li>
121
+ </ul>
122
+ </div>
123
+ </nav>
124
+ </div>
125
+
126
+ <div class="p-4 border-t border-indigo-600">
127
+ <div class="flex items-center">
128
+ <img src="https://via.placeholder.com/40" alt="User" class="rounded-full mr-3">
129
+ <div class="sidebar-text">
130
+ <div class="font-medium">Teacher</div>
131
+ <div class="text-xs text-indigo-300">[email protected]</div>
132
+ </div>
133
+ </div>
134
+ </div>
135
+ </div>
136
+
137
+ <!-- Main Content -->
138
+ <div class="content-area flex-1 flex flex-col overflow-hidden">
139
+ <!-- Top Navigation -->
140
+ <header class="bg-white border-b border-gray-200 p-4 flex items-center justify-between">
141
+ <h1 class="text-2xl font-bold text-gray-800">Create Teaching Notes</h1>
142
+
143
+ <div class="flex items-center space-x-4">
144
+ <div class="relative">
145
+ <button class="p-2 rounded-full hover:bg-gray-100">
146
+ <i class="fas fa-bell text-gray-600"></i>
147
+ </button>
148
+ <span class="absolute top-0 right-0 h-2 w-2 rounded-full bg-red-500"></span>
149
+ </div>
150
+
151
+ <div class="dropdown relative">
152
+ <button class="flex items-center space-x-2 focus:outline-none">
153
+ <span class="text-gray-700">Settings</span>
154
+ <i class="fas fa-chevron-down text-gray-500"></i>
155
+ </button>
156
+ <div class="dropdown-content right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1">
157
+ <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Profile</a>
158
+ <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Settings</a>
159
+ <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Log out</a>
160
+ </div>
161
+ </div>
162
+ </div>
163
+ </header>
164
+
165
+ <!-- Main Content Area -->
166
+ <main class="flex-1 overflow-y-auto p-6 bg-gray-50">
167
+ <div class="max-w-6xl mx-auto">
168
+ <!-- Form Section -->
169
+ <div class="bg-white rounded-lg shadow-md p-6 mb-6">
170
+ <h2 class="text-xl font-semibold mb-4">Note Generation Parameters</h2>
171
+
172
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
173
+ <div>
174
+ <label class="block text-sm font-medium text-gray-700 mb-1">Subject</label>
175
+ <select class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500">
176
+ <option>Mathematics</option>
177
+ <option>Science</option>
178
+ <option>Language Arts</option>
179
+ <option>History</option>
180
+ <option>Computer Science</option>
181
+ </select>
182
+ </div>
183
+
184
+ <div>
185
+ <label class="block text-sm font-medium text-gray-700 mb-1">Grade Level</label>
186
+ <select class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500">
187
+ <option>Elementary (K-5)</option>
188
+ <option>Middle School (6-8)</option>
189
+ <option>High School (9-12)</option>
190
+ <option>College</option>
191
+ </select>
192
+ </div>
193
+
194
+ <div>
195
+ <label class="block text-sm font-medium text-gray-700 mb-1">Topic</label>
196
+ <input type="text" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500" placeholder="Enter topic...">
197
+ </div>
198
+
199
+ <div>
200
+ <label class="block text-sm font-medium text-gray-700 mb-1">Template</label>
201
+ <select class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500">
202
+ <option>Standard Lesson Plan</option>
203
+ <option>Lecture Notes</option>
204
+ <option>Discussion Guide</option>
205
+ <option>Activity Plan</option>
206
+ <option>Assessment Guide</option>
207
+ </select>
208
+ </div>
209
+ </div>
210
+
211
+ <div class="mb-6">
212
+ <label class="block text-sm font-medium text-gray-700 mb-1">Additional Instructions</label>
213
+ <textarea class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 note-editor" rows="4" placeholder="Provide any specific instructions for the note generation..."></textarea>
214
+ </div>
215
+
216
+ <div class="flex justify-end space-x-3">
217
+ <button class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
218
+ Reset
219
+ </button>
220
+ <button class="px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
221
+ Generate Notes
222
+ </button>
223
+ </div>
224
+ </div>
225
+
226
+ <!-- Output Section -->
227
+ <div class="bg-white rounded-lg shadow-md p-6 mb-6">
228
+ <div class="flex justify-between items-center mb-4">
229
+ <h2 class="text-xl font-semibold">Generated Notes</h2>
230
+ <div class="flex space-x-2">
231
+ <button class="p-2 text-gray-600 hover:text-indigo-600 hover:bg-gray-100 rounded">
232
+ <i class="fas fa-copy"></i>
233
+ </button>
234
+ <div class="dropdown relative">
235
+ <button class="p-2 text-gray-600 hover:text-indigo-600 hover:bg-gray-100 rounded">
236
+ <i class="fas fa-download"></i>
237
+ </button>
238
+ <div class="dropdown-content right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1">
239
+ <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">PDF</a>
240
+ <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Word</a>
241
+ <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Markdown</a>
242
+ </div>
243
+ </div>
244
+ </div>
245
+ </div>
246
+
247
+ <div class="border border-gray-200 rounded-md p-4 note-editor">
248
+ <div class="text-center py-10 text-gray-400">
249
+ <i class="fas fa-file-alt text-4xl mb-3"></i>
250
+ <p>Your generated notes will appear here</p>
251
+ </div>
252
+ </div>
253
+ </div>
254
+
255
+ <!-- Templates Section -->
256
+ <div class="bg-white rounded-lg shadow-md p-6">
257
+ <h2 class="text-xl font-semibold mb-4">Available Templates</h2>
258
+
259
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
260
+ <!-- Template Card 1 -->
261
+ <div class="template-card bg-white border border-gray-200 rounded-lg p-4 hover:shadow-md transition duration-300">
262
+ <div class="flex items-center mb-3">
263
+ <div class="bg-indigo-100 p-2 rounded-full mr-3">
264
+ <i class="fas fa-book text-indigo-600"></i>
265
+ </div>
266
+ <h3 class="font-medium">Standard Lesson Plan</h3>
267
+ </div>
268
+ <p class="text-sm text-gray-600 mb-3">Comprehensive template with objectives, activities, and assessment sections.</p>
269
+ <button class="text-sm text-indigo-600 hover:text-indigo-800">Use Template</button>
270
+ </div>
271
+
272
+ <!-- Template Card 2 -->
273
+ <div class="template-card bg-white border border-gray-200 rounded-lg p-4 hover:shadow-md transition duration-300">
274
+ <div class="flex items-center mb-3">
275
+ <div class="bg-blue-100 p-2 rounded-full mr-3">
276
+ <i class="fas fa-chalkboard text-blue-600"></i>
277
+ </div>
278
+ <h3 class="font-medium">Lecture Notes</h3>
279
+ </div>
280
+ <p class="text-sm text-gray-600 mb-3">Structured format for presenting lecture content with key points.</p>
281
+ <button class="text-sm text-blue-600 hover:text-blue-800">Use Template</button>
282
+ </div>
283
+
284
+ <!-- Template Card 3 -->
285
+ <div class="template-card bg-white border border-gray-200 rounded-lg p-4 hover:shadow-md transition duration-300">
286
+ <div class="flex items-center mb-3">
287
+ <div class="bg-green-100 p-2 rounded-full mr-3">
288
+ <i class="fas fa-comments text-green-600"></i>
289
+ </div>
290
+ <h3 class="font-medium">Discussion Guide</h3>
291
+ </div>
292
+ <p class="text-sm text-gray-600 mb-3">Template for facilitating classroom discussions with questions.</p>
293
+ <button class="text-sm text-green-600 hover:text-green-800">Use Template</button>
294
+ </div>
295
+ </div>
296
+ </div>
297
+ </div>
298
+ </main>
299
+ </div>
300
+ </div>
301
+
302
+ <script>
303
+ // Toggle sidebar
304
+ document.getElementById('toggleSidebar').addEventListener('click', function() {
305
+ const sidebar = document.querySelector('.sidebar');
306
+ sidebar.classList.toggle('collapsed');
307
+
308
+ const contentArea = document.querySelector('.content-area');
309
+ if (sidebar.classList.contains('collapsed')) {
310
+ contentArea.classList.add('ml-16');
311
+ } else {
312
+ contentArea.classList.remove('ml-16');
313
+ }
314
+ });
315
+
316
+ // Simulate note generation
317
+ document.querySelector('button:contains("Generate Notes")').addEventListener('click', function() {
318
+ const outputArea = document.querySelector('.note-editor:not(textarea)');
319
+ outputArea.innerHTML = `
320
+ <div class="prose max-w-none">
321
+ <h2>Introduction to Algebra</h2>
322
+ <h3>Grade Level: Middle School (6-8)</h3>
323
+
324
+ <h4>Lesson Objectives:</h4>
325
+ <ul>
326
+ <li>Understand basic algebraic concepts</li>
327
+ <li>Solve simple linear equations</li>
328
+ <li>Apply algebraic thinking to word problems</li>
329
+ </ul>
330
+
331
+ <h4>Key Concepts:</h4>
332
+ <p>Variables, equations, expressions, solving for x</p>
333
+
334
+ <h4>Activities:</h4>
335
+ <ol>
336
+ <li>Warm-up: Number patterns (10 min)</li>
337
+ <li>Direct instruction: Variables and equations (20 min)</li>
338
+ <li>Guided practice: Solving equations (15 min)</li>
339
+ <li>Independent practice: Worksheet (15 min)</li>
340
+ </ol>
341
+
342
+ <h4>Assessment:</h4>
343
+ <p>Exit ticket with 3 problems solving for x</p>
344
+
345
+ <h4>Differentiation:</h4>
346
+ <p>Provide visual aids for visual learners, extended time for students who need it</p>
347
+ </div>
348
+ `;
349
+
350
+ // Show success message
351
+ const notification = document.createElement('div');
352
+ notification.className = 'fixed top-4 right-4 bg-green-500 text-white px-4 py-2 rounded shadow-lg';
353
+ notification.innerHTML = '<i class="fas fa-check-circle mr-2"></i> Notes generated successfully!';
354
+ document.body.appendChild(notification);
355
+
356
+ setTimeout(() => {
357
+ notification.remove();
358
+ }, 3000);
359
+ });
360
+
361
+ // Template selection
362
+ document.querySelectorAll('.template-card button').forEach(button => {
363
+ button.addEventListener('click', function() {
364
+ const templateName = this.closest('.template-card').querySelector('h3').textContent;
365
+ const templateSelect = document.querySelector('select:contains("Template")');
366
+
367
+ // Find and select the matching option
368
+ for (let option of templateSelect.options) {
369
+ if (option.text === templateName) {
370
+ option.selected = true;
371
+ break;
372
+ }
373
+ }
374
+
375
+ // Show success message
376
+ const notification = document.createElement('div');
377
+ notification.className = 'fixed top-4 right-4 bg-blue-500 text-white px-4 py-2 rounded shadow-lg';
378
+ notification.innerHTML = `<i class="fas fa-check-circle mr-2"></i> "${templateName}" template selected!`;
379
+ document.body.appendChild(notification);
380
+
381
+ setTimeout(() => {
382
+ notification.remove();
383
+ }, 3000);
384
+ });
385
+ });
386
+ </script>
387
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Godito/notes-generator" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
388
+ </html>