Bwrite commited on
Commit
156c2de
·
verified ·
1 Parent(s): 39cb072

Update app.py

Browse files

Admission ChatBot

Files changed (1) hide show
  1. app.py +24 -35
app.py CHANGED
@@ -45,15 +45,15 @@ class BOUESTIChatbot:
45
  'contact_email': ['[email protected]', '[email protected]'],
46
  'contact_phone': ['+234-805-797-5157', '+234-814-008-0237', '+234-701-930-3769'],
47
  'website': 'portal.bouesti.edu.ng',
48
- 'ranking': 'Listed in World Universities Ranking 2023 (Reporter's category)',
49
- 'mission': 'To generate, disseminate, advance knowledge, and educate students in science and technology with the aim of bringing this knowledge to finding solutions to the major challenges facing society and the world's challenges in the 21st century.',
50
  'vision': 'To be an international University recognized and noted for innovation and self-reliance projecting culturally sound and disciplined researchers and products who are committed to learning for gainful engagement for the proper education of the total man.'
51
  },
52
 
53
  # Admission Requirements
54
  'admission_requirements': {
55
  'utme_score': 140,
56
- 'olevel_requirements': '5 O'Level Credit passes including English Language, Mathematics, and 3 other relevant subjects at not more than 2 sittings',
57
  'direct_entry': 'NCE, HND, ND, JUPEB, and IJMB qualifications are acceptable',
58
  'jamb_requirements': 'Must change institution to BOUESTI on JAMB portal and upload WAEC/SSCE results'
59
  },
@@ -164,16 +164,7 @@ class BOUESTIChatbot:
164
  "I can help you with questions about BOUESTI admissions, programs, fees, and general information. Could you please ask about one of these topics?"
165
  ],
166
  'screening_documents': [
167
- 'The Documents Required for Screening are:
168
- 1. O’Level results (WAEC, NECO, or NABTEB).
169
- 2. JAMB UTME result slip.
170
- 3. JAMB admission letter
171
- 4. Birth certificate or age declaration.
172
- 5. Passport photographs.
173
- 6. Local Government Identification.
174
- 7. Bio-data form
175
- 8. School fees payment receipt
176
- 9. For Direct Entry, additional documents including A-Level results, HND certificates, or transcripts are required'
177
  ]
178
  }
179
 
@@ -222,8 +213,8 @@ class BOUESTIChatbot:
222
  r'pay fees|payment method|card payment|acceptance fee payment'
223
  ],
224
  'screening_documents': [
225
- r'screening.*documents',
226
- r'documents.*screening',
227
  r'what.*screening.*document',
228
  r'require.*screening.*document',
229
  r'document.*required.*screening',
@@ -232,9 +223,9 @@ class BOUESTIChatbot:
232
  ],
233
 
234
  'guide_request': [
235
- r'guide me',
236
- r'help guide',
237
- r'show.*guide'
238
  ]
239
 
240
 
@@ -317,8 +308,7 @@ class BOUESTIChatbot:
317
  **Steps:**
318
  """
319
  for i, step in enumerate(steps, 1):
320
- response += f"{i}. {step}
321
- "
322
 
323
  response += f"""
324
  **Pre-Degree Application Fee:** {self.knowledge_base['application_process']['predegree_fee']}
@@ -350,9 +340,7 @@ class BOUESTIChatbot:
350
 
351
  def get_programs_response(self):
352
  """Get academic programs information"""
353
- response = "🎓 **BOUESTI Academic Programs:**
354
-
355
- "
356
 
357
  program_categories = [
358
  ('Engineering', 'engineering'),
@@ -367,16 +355,12 @@ class BOUESTIChatbot:
367
  for category_name, category_key in program_categories:
368
  if category_key in self.knowledge_base['programs']:
369
  programs = self.knowledge_base['programs'][category_key]
370
- response += f"**{category_name}:**
371
- "
372
  for program in programs[:3]: # Show first 3 programs
373
- response += f"• B.Sc./B.Tech/B.A. {program}
374
- "
375
- response += "
376
- "
377
 
378
- response += "📋 **Total:** 70+ degree programs across all faculties
379
- "
380
  response += "For complete list, visit: portal.bouesti.edu.ng"
381
 
382
  return response
@@ -461,11 +445,9 @@ class BOUESTIChatbot:
461
  def get_screening_documents_response(self):
462
  """Get required documents for screening"""
463
  documents = self.knowledge_base['screening_documents']
464
- response = 'The Documents Required for Screening are:
465
- '
466
  for i, doc in enumerate(documents, 1):
467
- response += f"{i}. {doc}
468
- "
469
  return response
470
 
471
 
@@ -613,3 +595,10 @@ if __name__ == "__main__":
613
 
614
  # # Create and launch Gradio interface
615
  # interface = chatbot.create_gradio_interface()
 
 
 
 
 
 
 
 
45
  'contact_email': ['[email protected]', '[email protected]'],
46
  'contact_phone': ['+234-805-797-5157', '+234-814-008-0237', '+234-701-930-3769'],
47
  'website': 'portal.bouesti.edu.ng',
48
+ 'ranking': 'Listed in World Universities Ranking 2023 (Reporter\'s category)',
49
+ 'mission': 'To generate, disseminate, advance knowledge, and educate students in science and technology with the aim of bringing this knowledge to finding solutions to the major challenges facing society and the world\'s challenges in the 21st century.',
50
  'vision': 'To be an international University recognized and noted for innovation and self-reliance projecting culturally sound and disciplined researchers and products who are committed to learning for gainful engagement for the proper education of the total man.'
51
  },
52
 
53
  # Admission Requirements
54
  'admission_requirements': {
55
  'utme_score': 140,
56
+ 'olevel_requirements': '5 O\'Level Credit passes including English Language, Mathematics, and 3 other relevant subjects at not more than 2 sittings',
57
  'direct_entry': 'NCE, HND, ND, JUPEB, and IJMB qualifications are acceptable',
58
  'jamb_requirements': 'Must change institution to BOUESTI on JAMB portal and upload WAEC/SSCE results'
59
  },
 
164
  "I can help you with questions about BOUESTI admissions, programs, fees, and general information. Could you please ask about one of these topics?"
165
  ],
166
  'screening_documents': [
167
+ 'The Documents Required for Screening are: \n1. O’Level results (WAEC, NECO, or NABTEB).\n2. JAMB UTME result slip.\n3. JAMB admission letter\n4. Birth certificate or age declaration.\n5. Passport photographs.\n6. Local Government Identification.\n7. Bio-data form\n8. School fees payment receipt\n9. For Direct Entry, additional documents including A-Level results, HND certificates, or transcripts are required'
 
 
 
 
 
 
 
 
 
168
  ]
169
  }
170
 
 
213
  r'pay fees|payment method|card payment|acceptance fee payment'
214
  ],
215
  'screening_documents': [
216
+ r'\bscreening\b.*\bdocuments\b',
217
+ r'\bdocuments\b.*\bscreening\b',
218
  r'what.*screening.*document',
219
  r'require.*screening.*document',
220
  r'document.*required.*screening',
 
223
  ],
224
 
225
  'guide_request': [
226
+ r'\bguide me\b',
227
+ r'\bhelp guide\b',
228
+ r'\bshow.*guide\b'
229
  ]
230
 
231
 
 
308
  **Steps:**
309
  """
310
  for i, step in enumerate(steps, 1):
311
+ response += f"{i}. {step}\n"
 
312
 
313
  response += f"""
314
  **Pre-Degree Application Fee:** {self.knowledge_base['application_process']['predegree_fee']}
 
340
 
341
  def get_programs_response(self):
342
  """Get academic programs information"""
343
+ response = "🎓 **BOUESTI Academic Programs:**\n\n"
 
 
344
 
345
  program_categories = [
346
  ('Engineering', 'engineering'),
 
355
  for category_name, category_key in program_categories:
356
  if category_key in self.knowledge_base['programs']:
357
  programs = self.knowledge_base['programs'][category_key]
358
+ response += f"**{category_name}:**\n"
 
359
  for program in programs[:3]: # Show first 3 programs
360
+ response += f"• B.Sc./B.Tech/B.A. {program}\n"
361
+ response += "\n"
 
 
362
 
363
+ response += "📋 **Total:** 70+ degree programs across all faculties\n"
 
364
  response += "For complete list, visit: portal.bouesti.edu.ng"
365
 
366
  return response
 
445
  def get_screening_documents_response(self):
446
  """Get required documents for screening"""
447
  documents = self.knowledge_base['screening_documents']
448
+ response = 'The Documents Required for Screening are: \n'
 
449
  for i, doc in enumerate(documents, 1):
450
+ response += f"{i}. {doc}\n"
 
451
  return response
452
 
453
 
 
595
 
596
  # # Create and launch Gradio interface
597
  # interface = chatbot.create_gradio_interface()
598
+
599
+ # # Launch the interface
600
+ # interface.launch(
601
+ # share=True, # Creates a public link
602
+ # debug=True, # Enable debug mode
603
+ # height=600 # Set height
604
+ # )