jdesiree commited on
Commit
afa319a
·
verified ·
1 Parent(s): c9d5c33

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +124 -170
app.py CHANGED
@@ -55,7 +55,7 @@ You recognize that students may seek direct answers to homework, assignments, or
55
  - **Suggest study strategies**: Recommend effective learning approaches for the subject matter
56
 
57
  ## Response Guidelines
58
- - **For math problems**: Explain concepts, provide formula derivations, and guide through problem-solving steps without computing final numerical answers. Always use LaTeX formatting for mathematical expressions: inline with $...$ and display with $$...$$
59
  - **For multiple-choice questions**: Discuss the concepts being tested and help students understand how to analyze options rather than identifying the correct choice
60
  - **For essays or written work**: Discuss research strategies, organizational techniques, and critical thinking approaches rather than providing content or thesis statements
61
  - **For factual questions**: Provide educational context and encourage students to synthesize information rather than stating direct answers
@@ -76,15 +76,58 @@ You recognize that students may seek direct answers to homework, assignments, or
76
  - Encourage students to explain their thinking and reasoning
77
  - Provide honest, accurate feedback even when it may not be what the student wants to hear
78
 
79
- ## Subject-Specific Guidelines
80
-
81
- **Mathematics**: Use LaTeX formatting for all mathematical expressions. Provide step-by-step conceptual guidance, work through similar examples, and help students understand underlying principles rather than just getting answers.
82
-
83
- **Research & Writing**: Guide students through the research process, teach evaluation of sources, help with organization and structure, but encourage original thinking and writing.
84
-
85
- **Science**: Focus on understanding concepts, scientific method, and critical thinking. Help students learn to analyze data and draw conclusions.
86
-
87
- **Study Skills**: Provide evidence-based learning strategies, time management techniques, and effective study methods tailored to different subjects and learning styles.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
 
89
  Your goal is to be an educational partner who empowers students to succeed through understanding, not a service that completes their work for them."""
90
 
@@ -165,7 +208,6 @@ def respond_with_enhanced_streaming(message, history):
165
  yield "Sorry, I encountered an error while generating the response."
166
 
167
  finally:
168
- # FIXED: Removed the 'mode' parameter - using centralized system prompt
169
  metrics_tracker.log_interaction(
170
  query=message,
171
  response=response,
@@ -174,6 +216,8 @@ def respond_with_enhanced_streaming(message, history):
174
  error_message=error_message,
175
  )
176
 
 
 
177
  # ===============================================================================
178
  # UI CONFIGURATION SECTION - ALL UI RELATED CODE CENTRALIZED HERE
179
  # ===============================================================================
@@ -183,20 +227,6 @@ custom_css = """
183
  /* Import Oswald font - Google Fonts */
184
  @import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap');
185
 
186
- /* CRITICAL: Override Gradio's default theme with maximum specificity */
187
- .gradio-container, .gradio-container *,
188
- [class*="gradio-container"], [class*="gradio-container"] *,
189
- .app, .app *, body, body * {
190
- background-color: rgb(240, 236, 230) !important;
191
- font-family: "Oswald", sans-serif !important;
192
- color: #120f0e !important;
193
- }
194
-
195
- /* Force override of any gray backgrounds */
196
- [class*="bg-"], [style*="background"], div, section, main, article {
197
- background-color: rgb(240, 236, 230) !important;
198
- }
199
-
200
  /* HIDE the HTML components that create scrollbars */
201
  #component-1, #component-2, #component-3 {
202
  display: none !important;
@@ -230,12 +260,18 @@ custom_css = """
230
  display: none !important;
231
  }
232
 
 
 
 
 
 
 
233
  .title-header {
234
  background-color: rgb(240, 236, 230) !important;
235
- padding: 10px 20px !important;
236
  margin: 0 !important;
237
- border-bottom: 1pt solid #59524f !important;
238
- text-align: left !important;
239
  flex-shrink: 0 !important;
240
  height: 60px !important;
241
  display: flex !important;
@@ -244,25 +280,24 @@ custom_css = """
244
  }
245
 
246
  .title-header h1 {
247
- font-size: 1.5rem !important;
248
  font-weight: 600 !important;
249
  color: #120f0e !important;
250
- margin: 0 !important;
251
- padding: 0 !important;
252
- background-color: transparent !important;
253
  }
254
 
255
  /* Input controls styling - acts as footer */
256
- .input-controls, .input-controls * {
257
  padding: 15px 20px !important;
258
  background-color: rgb(240, 236, 230) !important;
259
- border-top: 1pt solid #59524f !important;
260
  flex-shrink: 0 !important;
261
  width: 100% !important;
262
  }
263
 
264
- /* Main container styling - Use universal Gradio container selector */
265
- .gradio-container {
266
  background-color: rgb(240, 236, 230) !important;
267
  font-family: "Oswald", sans-serif !important;
268
  color: #120f0e !important;
@@ -275,23 +310,8 @@ custom_css = """
275
  flex-direction: column !important;
276
  }
277
 
278
- /* Also target any versioned container that might exist */
279
- [class*="gradio-container"] {
280
- background-color: rgb(240, 236, 230) !important;
281
- font-family: "Oswald", sans-serif !important;
282
- color: #120f0e !important;
283
- padding: 0 !important;
284
- margin: 0 !important;
285
- height: 100vh !important;
286
- max-height: 100vh !important;
287
- overflow: hidden !important;
288
- display: flex !important;
289
- flex-direction: column !important;
290
- }
291
-
292
- /* Target Gradio's internal structure - more universal approach */
293
- .gradio-container > div,
294
- [class*="gradio-container"] > div {
295
  height: 95% !important;
296
  display: flex !important;
297
  flex-direction: column !important;
@@ -299,65 +319,63 @@ custom_css = """
299
  margin-top: 0 !important;
300
  }
301
 
302
- /* Chatbot container - maximum override power */
303
- [data-testid="chatbot"],
304
- .gradio-chatbot,
305
- [class*="chatbot"],
306
- .chatbot-container {
307
  background-color: #d9d1ce !important;
308
  border: 1pt solid #59524f !important;
309
  border-radius: 6px !important;
310
  padding: 15px !important;
311
- flex: 1 !important;
312
- min-height: 0 !important;
313
  overflow-y: auto !important;
314
  margin: 15px 20px !important;
315
  }
316
 
317
- /* Message styling with maximum specificity */
318
- .message.bot, .message.bot *,
319
- .message.assistant, .message.assistant *,
320
- [class*="message"][class*="bot"], [class*="message"][class*="bot"] *,
321
- [class*="message"][class*="assistant"], [class*="message"][class*="assistant"] * {
322
  background-color: #f09c7d !important;
323
  color: #120f0e !important;
324
  border-radius: 8px !important;
325
  padding: 12px 16px !important;
326
  border: 1pt solid #59524f !important;
327
- max-width: 70% !important;
328
- margin-left: 0 !important;
329
- margin-right: auto !important;
330
- word-wrap: break-word !important;
331
  font-weight: 400 !important;
332
  margin-bottom: 10px !important;
333
  }
334
 
335
- .message.user, .message.user *,
336
- [class*="message"][class*="user"], [class*="message"][class*="user"] * {
337
  background-color: #a69189 !important;
338
  color: #120f0e !important;
339
  border-radius: 8px !important;
340
  padding: 12px 16px !important;
341
  border: 1pt solid #59524f !important;
342
- max-width: 70% !important;
343
- margin-left: auto !important;
344
- margin-right: 0 !important;
345
- word-wrap: break-word !important;
346
  font-weight: 400 !important;
347
  margin-bottom: 10px !important;
348
  }
349
 
350
- /* Textbox styling with nuclear-level override */
351
- textarea, textarea *,
352
- input[type="text"], input[type="text"] *,
353
- .textbox, .textbox *,
354
- [class*="textbox"], [class*="textbox"] * {
 
 
 
 
355
  background-color: #f0ece6 !important;
356
  border: 1pt solid #59524f !important;
357
  border-radius: 6px !important;
358
  color: #120f0e !important;
359
  font-family: "Oswald", sans-serif !important;
360
  padding: 10px !important;
 
361
  }
362
 
363
  .input-textbox textarea:focus {
@@ -370,79 +388,33 @@ input[type="text"], input[type="text"] *,
370
  min-width: 80px !important;
371
  }
372
 
373
- /* Buttons with nuclear override */
374
- button, button *,
375
- .btn, .btn *,
376
- [class*="button"], [class*="button"] * {
377
- font-family: "Oswald", sans-serif !important;
378
- color: #120f0e !important;
379
- border: 1pt solid #59524f !important;
380
- border-radius: 6px !important;
381
- font-weight: 500 !important;
382
- padding: 8px 16px !important;
383
- margin-bottom: 5px !important;
384
- width: 100% !important;
385
  }
386
 
387
- .send-button, .send-button * {
388
- background-color: #f09c7d !important;
389
- color: #120f0e !important;
390
  }
391
 
392
  .send-button:hover {
393
- background-color: #e8895a !important;
394
- border-color: #4a3f3c !important;
395
  }
396
 
397
- .clear-button, .clear-button * {
398
- background-color: #a69189 !important;
399
- color: #120f0e !important;
400
  }
401
 
402
  .clear-button:hover {
403
- background-color: #8f7d73 !important;
404
- border-color: #4a3f3c !important;
405
- }
406
-
407
- /* Add fallback body styling */
408
- body {
409
- background-color: rgb(240, 236, 230) !important;
410
- font-family: "Oswald", sans-serif !important;
411
- color: #120f0e !important;
412
- }
413
-
414
- /* Target the main app wrapper */
415
- #root, .app, .main {
416
- background-color: rgb(240, 236, 230) !important;
417
- }
418
-
419
- /* Force override CSS custom properties */
420
- :root {
421
- --background-fill-primary: rgb(240, 236, 230) !important;
422
- --background-fill-secondary: #d9d1ce !important;
423
- --color-accent: #f09c7d !important;
424
- --color-accent-soft: #a69189 !important;
425
- --body-text-color: #120f0e !important;
426
- --block-background-fill: rgb(240, 236, 230) !important;
427
- --panel-background-fill: rgb(240, 236, 230) !important;
428
- }
429
-
430
- /* Override any default Gradio grays */
431
- .bg-white,
432
- .bg-gray-50,
433
- .bg-gray-100,
434
- .bg-gray-200,
435
- [class*="bg-white"],
436
- [class*="bg-gray"] {
437
- background-color: rgb(240, 236, 230) !important;
438
- }
439
-
440
- /* Text color overrides */
441
- .text-gray-700,
442
- .text-gray-800,
443
- .text-gray-900,
444
- [class*="text-gray"] {
445
- color: #120f0e !important;
446
  }
447
 
448
  /* Ensure Gradio footer is visible and properly positioned */
@@ -482,21 +454,14 @@ footer.svelte-czcr5b .divider {
482
 
483
  /* Responsive design */
484
  @media (max-width: 768px) {
485
- .message.bot, .message.bot *,
486
- .message.user, .message.user *,
487
- [class*="message"][class*="bot"], [class*="message"][class*="bot"] *,
488
- [class*="message"][class*="user"], [class*="message"][class*="user"] *,
489
- [class*="message"][class*="assistant"], [class*="message"][class*="assistant"] * {
490
- max-width: 85% !important;
491
  }
492
 
493
  .input-controls {
494
  padding: 10px !important;
495
  }
496
-
497
- .title-header h1 {
498
- font-size: 1.2rem !important;
499
- }
500
  }
501
  """
502
 
@@ -575,23 +540,11 @@ def clear_chat():
575
  def create_interface():
576
  """Creates and configures the complete Gradio interface."""
577
 
578
- # Force light theme and disable default styling
579
- theme = gr.themes.Base().set(
580
- background_fill_primary="rgb(240, 236, 230)",
581
- background_fill_secondary="#d9d1ce",
582
- color_accent="#f09c7d",
583
- color_accent_soft="#a69189",
584
- body_text_color="#120f0e",
585
- block_background_fill="rgb(240, 236, 230)",
586
- panel_background_fill="rgb(240, 236, 230)"
587
- )
588
-
589
  with gr.Blocks(
590
  title="EduBot",
591
  fill_width=True,
592
  fill_height=True,
593
- theme=theme,
594
- css=custom_css
595
  ) as demo:
596
  # Add head content and MathJax
597
  gr.HTML(html_head_content)
@@ -610,12 +563,12 @@ def create_interface():
610
  show_share_button=False,
611
  avatar_images=None,
612
  elem_id="main-chatbot",
613
- container=False,
614
  scale=1,
615
- height="70vh"
616
  )
617
 
618
- # Input Section
619
  with gr.Row(elem_classes=["input-controls"]):
620
  msg = gr.Textbox(
621
  placeholder="Ask me about math, research, study strategies, or any educational topic...",
@@ -644,4 +597,5 @@ def create_interface():
644
  if __name__ == "__main__":
645
  logger.info("Starting EduBot...")
646
  demo = create_interface()
647
- demo.launch(debug=True, share=True)
 
 
55
  - **Suggest study strategies**: Recommend effective learning approaches for the subject matter
56
 
57
  ## Response Guidelines
58
+ - **For math problems**: Explain concepts, provide formula derivations, and guide through problem-solving steps without computing final numerical answers
59
  - **For multiple-choice questions**: Discuss the concepts being tested and help students understand how to analyze options rather than identifying the correct choice
60
  - **For essays or written work**: Discuss research strategies, organizational techniques, and critical thinking approaches rather than providing content or thesis statements
61
  - **For factual questions**: Provide educational context and encourage students to synthesize information rather than stating direct answers
 
76
  - Encourage students to explain their thinking and reasoning
77
  - Provide honest, accurate feedback even when it may not be what the student wants to hear
78
 
79
+ ## Modes
80
+ **Select the mode that best matches the user's needs.**
81
+
82
+ **Math Mode**
83
+ LaTeX formatting is enabled for math. You must provide LaTeX formatting for all math, either as inline LaTeX or centered display LaTeX.
84
+ You will address requests to solve, aid in understanding, or explore mathematical context. Use logical ordering for content, providing necessary terms and definitions as well as concept explanations along with math to foster understanding of core concepts. Rather than specifically answering the math problem provided, begin with solving a similar problem that requires the same steps and foundational mathematical knowledge, then prompt the user to work through the problem themselves. If the user insists you solve the problem, engage in a two-way conversation where you provide the steps but request the user solve for the answer one step at a time.
85
+ LaTeX should always be used for math.
86
+ LaTeX Examples:
87
+ - Inline: "The slope is $m = \\frac{{y_2 - y_1}}{{x_2 - x_1}}$ in this case."
88
+ - Display: "The quadratic formula is: $x = \\frac{{-b \\pm \\sqrt{{b^2-4ac}}}}{{2a}}$"
89
+ Always use double backslashes (\\\\) for LaTeX commands like \\\\frac, \\\\sqrt, \\\\int, etc.
90
+
91
+ **Research Mode**
92
+ Your main goal is to help the user learn to research topics, a critical skill. Function as a partner rather than a search engine.
93
+ Over the course of the conversation, guide the user through a seven-step research process:
94
+ 1) **Identifying a topic**
95
+ 2) **Finding background information**
96
+ 3) **Developing a research design**
97
+ 4) **Collecting data**
98
+ 5) **Analyzing data**
99
+ 6) **Drawing conclusions**
100
+ 7) **Disseminating findings**
101
+ You may provide formatted citations if the user asks for them and provides the needed information. If not all information is provided but citations are requested, follow up with guidance on how to obtain the information to generate a citation. By default, you will not provide citations.
102
+ Example citations:
103
+ APA Style
104
+ In-text: (Smith, 2023, p. 45)
105
+ Reference: Smith, J. A. (2023). Book title. Publisher.
106
+ MLA Style
107
+ In-text: (Smith 45)
108
+ Works Cited: Smith, John A. Book Title. Publisher, 2023.
109
+ Chicago Style
110
+ Footnote: ¹John A. Smith, Book Title (Publisher, 2023), 45.
111
+ Bibliography: Smith, John A. Book Title. Publisher, 2023.
112
+ Harvard Style
113
+ In-text: (Smith 2023, p. 45)
114
+ Reference: Smith, J.A. (2023) Book title. Publisher.
115
+ IEEE Style
116
+ In-text: [1]
117
+ Reference: [1] J. A. Smith, Book Title. Publisher, 2023.
118
+ In this mode you may not use LaTeX formatting.
119
+
120
+ **Study Mode**
121
+ Engage the user in a mix of two teaching styles: student-centered and inquiry-based learning.
122
+ Student Centered: Adjust to reflect the student's reading level and level of understanding of a topic as the conversation progresses. Do not assume the user is an expert but instead assume they may have familiarity but desire to learn more about the topic they are studying. Provide definitions for terms you use in a conversational way, gradually shifting to using just the terms without definitions as the user becomes more familiar with them.
123
+ Inquiry-based learning: Engage the user through questions that compel them to consider what they want to know and then explore the topics through guided conversation.
124
+ Over the course of the conversation, prompt the user with a question to gauge their growing knowledge or progress on the topic.
125
+ For example:
126
+ After two to three turns of conversation discussing a topic, pick a specific term or concept from the conversation history to craft either a multiple-choice or written answer question for the user with no other comments along with it. If the student is correct, congratulate them on their progress and inquire about their next learning goal on the topic. If the user fails the question, return with a short response that explains the correct answer in a kind tone.
127
+ In this mode you may not use LaTeX formatting.
128
+
129
+ **General/Other Mode**
130
+ You are EduBot, a comprehensive AI learning assistant. Help users leverage educational tools and resources to enrich their education. Offer yourself as a resource for the student, prompting them to request help with **math topics**, **research strategy**, or **studying a topic**.
131
 
132
  Your goal is to be an educational partner who empowers students to succeed through understanding, not a service that completes their work for them."""
133
 
 
208
  yield "Sorry, I encountered an error while generating the response."
209
 
210
  finally:
 
211
  metrics_tracker.log_interaction(
212
  query=message,
213
  response=response,
 
216
  error_message=error_message,
217
  )
218
 
219
+
220
+
221
  # ===============================================================================
222
  # UI CONFIGURATION SECTION - ALL UI RELATED CODE CENTRALIZED HERE
223
  # ===============================================================================
 
227
  /* Import Oswald font - Google Fonts */
228
  @import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap');
229
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
  /* HIDE the HTML components that create scrollbars */
231
  #component-1, #component-2, #component-3 {
232
  display: none !important;
 
260
  display: none !important;
261
  }
262
 
263
+ /* Apply Oswald globally */
264
+ *, *::before, *::after {
265
+ font-family: "Oswald", sans-serif !important;
266
+ color: #120f0e !important;
267
+ }
268
+
269
  .title-header {
270
  background-color: rgb(240, 236, 230) !important;
271
+ padding: 10px 20px;
272
  margin: 0 !important;
273
+ border-bottom: 1pt solid #59524f;
274
+ text-align: left;
275
  flex-shrink: 0 !important;
276
  height: 60px !important;
277
  display: flex !important;
 
280
  }
281
 
282
  .title-header h1 {
283
+ font-size: 1.5rem;
284
  font-weight: 600 !important;
285
  color: #120f0e !important;
286
+ margin: 0;
287
+ padding: 0;
 
288
  }
289
 
290
  /* Input controls styling - acts as footer */
291
+ .input-controls {
292
  padding: 15px 20px !important;
293
  background-color: rgb(240, 236, 230) !important;
294
+ border-top: 1pt solid #59524f;
295
  flex-shrink: 0 !important;
296
  width: 100% !important;
297
  }
298
 
299
+ /* Main container styling - viewport height with no top margin */
300
+ .gradio-container-5-42-0 {
301
  background-color: rgb(240, 236, 230) !important;
302
  font-family: "Oswald", sans-serif !important;
303
  color: #120f0e !important;
 
310
  flex-direction: column !important;
311
  }
312
 
313
+ /* Target Gradio's internal structure */
314
+ .gradio-container-5-42-0 > div {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
315
  height: 95% !important;
316
  display: flex !important;
317
  flex-direction: column !important;
 
319
  margin-top: 0 !important;
320
  }
321
 
322
+ /* Chat styling - FLEX to fill space */
323
+ .gradio-container-5-42-0 .gradio-chatbot {
 
 
 
324
  background-color: #d9d1ce !important;
325
  border: 1pt solid #59524f !important;
326
  border-radius: 6px !important;
327
  padding: 15px !important;
328
+ flex: 1 !important; /* Fill all remaining space */
329
+ min-height: 0 !important; /* Prevent overflow issues */
330
  overflow-y: auto !important;
331
  margin: 15px 20px !important;
332
  }
333
 
334
+ /* Message styling */
335
+ .gradio-container-5-42-0 .gradio-chatbot .message.bot .markdown {
 
 
 
336
  background-color: #f09c7d !important;
337
  color: #120f0e !important;
338
  border-radius: 8px !important;
339
  padding: 12px 16px !important;
340
  border: 1pt solid #59524f !important;
341
+ max-width: 70%;
342
+ margin-left: 0;
343
+ margin-right: auto;
344
+ word-wrap: break-word;
345
  font-weight: 400 !important;
346
  margin-bottom: 10px !important;
347
  }
348
 
349
+ .gradio-container-5-42-0 .gradio-chatbot .message.user .markdown {
 
350
  background-color: #a69189 !important;
351
  color: #120f0e !important;
352
  border-radius: 8px !important;
353
  padding: 12px 16px !important;
354
  border: 1pt solid #59524f !important;
355
+ max-width: 70%;
356
+ margin-left: auto;
357
+ margin-right: 0;
358
+ word-wrap: break-word;
359
  font-weight: 400 !important;
360
  margin-bottom: 10px !important;
361
  }
362
 
363
+ /* Input controls styling */
364
+ .input-controls {
365
+ padding: 15px 20px !important;
366
+ background-color: rgb(240, 236, 230) !important;
367
+ border-top: 1pt solid #59524f;
368
+ flex-shrink: 0 !important;
369
+ }
370
+
371
+ .input-textbox textarea {
372
  background-color: #f0ece6 !important;
373
  border: 1pt solid #59524f !important;
374
  border-radius: 6px !important;
375
  color: #120f0e !important;
376
  font-family: "Oswald", sans-serif !important;
377
  padding: 10px !important;
378
+ resize: none !important;
379
  }
380
 
381
  .input-textbox textarea:focus {
 
388
  min-width: 80px !important;
389
  }
390
 
391
+ .send-button, .clear-button {
392
+ border: 1pt solid #59524f !important;
393
+ border-radius: 6px !important;
394
+ font-weight: 500 !important;
395
+ padding: 8px 16px !important;
396
+ margin-bottom: 5px !important;
397
+ width: 100% !important;
 
 
 
 
 
398
  }
399
 
400
+ .send-button {
401
+ background-color: #f09c7d !important;
402
+ color: #120f0e !important;
403
  }
404
 
405
  .send-button:hover {
406
+ background-color: #e8895a !important;
407
+ border-color: #4a3f3c !important;
408
  }
409
 
410
+ .clear-button {
411
+ background-color: #a69189 !important;
412
+ color: #120f0e !important;
413
  }
414
 
415
  .clear-button:hover {
416
+ background-color: #8f7d73 !important;
417
+ border-color: #4a3f3c !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
418
  }
419
 
420
  /* Ensure Gradio footer is visible and properly positioned */
 
454
 
455
  /* Responsive design */
456
  @media (max-width: 768px) {
457
+ .gradio-container-5-42-0 .gradio-chatbot .message.bot .markdown,
458
+ .gradio-container-5-42-0 .gradio-chatbot .message.user .markdown {
459
+ max-width: 85%;
 
 
 
460
  }
461
 
462
  .input-controls {
463
  padding: 10px !important;
464
  }
 
 
 
 
465
  }
466
  """
467
 
 
540
  def create_interface():
541
  """Creates and configures the complete Gradio interface."""
542
 
 
 
 
 
 
 
 
 
 
 
 
543
  with gr.Blocks(
544
  title="EduBot",
545
  fill_width=True,
546
  fill_height=True,
547
+ theme=gr.themes.Base()
 
548
  ) as demo:
549
  # Add head content and MathJax
550
  gr.HTML(html_head_content)
 
563
  show_share_button=False,
564
  avatar_images=None,
565
  elem_id="main-chatbot",
566
+ container=False, # Remove wrapper
567
  scale=1,
568
+ height="70vh" # Explicit height instead of min_height
569
  )
570
 
571
+ # Input Section - fixed height
572
  with gr.Row(elem_classes=["input-controls"]):
573
  msg = gr.Textbox(
574
  placeholder="Ask me about math, research, study strategies, or any educational topic...",
 
597
  if __name__ == "__main__":
598
  logger.info("Starting EduBot...")
599
  demo = create_interface()
600
+ demo.launch(debug=True, share=True)
601
+