Walterchamy commited on
Commit
386ea6c
1 Parent(s): 5f739d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +79 -2
app.py CHANGED
@@ -1,9 +1,81 @@
1
  import os
2
  import openai
3
  import streamlit as st
4
-
5
  openai.api_key = os.getenv("OPENAI_API_KEY")
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  def generate_response(user_input):
8
  response = openai.ChatCompletion.create(
9
  model="gpt-3.5-turbo",
@@ -13,7 +85,12 @@ def generate_response(user_input):
13
  {"role": "user", "content": user_input},
14
  ]
15
  )
16
- return response['choices'][0]['message']['content']
 
 
 
 
 
17
 
18
  def main():
19
  st.title("Chatbot Assistant")
 
1
  import os
2
  import openai
3
  import streamlit as st
 
4
  openai.api_key = os.getenv("OPENAI_API_KEY")
5
 
6
+ KIITEC_CONTENT = """
7
+ KIITEC is a technical institution registered by NACTE (REG/EOS/027) based in Moshono, Arusha next to Masai Camp.
8
+
9
+ The institute was founded in 2004 by French engineers and has thence contrived to produce the most competent technicians in the country. The institute is financed and supported by two NGOs: The Foundation for Technical Education (FTE-Swiss) and Action Development Education International (ADEI-French). In 2004, ADEI's partner FTE built the Kilimanjaro International Institute of Telecommunications, Electronics and Computers (KIITEC) introducing state-of-the-art teaching facilities to train technicians in Arusha, Tanzania.
10
+
11
+ Following construction, ADEI joined FTE in its ambition to make change through technical education and has played a pivotal role in the on-the-ground education programming and training at KIITEC ever since. Today, KIITEC acts as the international training center where educators travel from different corners of Africa to upgrade their skills.
12
+
13
+ Resting on a 15-acre campus with hostel available inside it, KIITEC offers the most advanced targeted training technologies in the region. The innovative education model developed at KIITEC is based on a hands-on and student-centered approach to learning with full access to modern learning equipment simulating real-world practical experiences. The training center is registered and accredited by the National Council for Technical Education (NACTE) and awards successful graduates with a 3-year National Technical Award Level Six (NTA-6) Diploma.
14
+
15
+ KIITEC specializes in diploma programs including:
16
+ - Electrical & Computer Engineering
17
+ - Electrical & Industrial Automation
18
+ - Electronics & Telecommunication Engineering
19
+ - Electrical & Renewable Energies
20
+
21
+ Short course programs offered by KIITEC include:
22
+ - Computer Application
23
+ - IT & System Security
24
+ - Electrical Domestic & Solar PV System Installation
25
+
26
+ Future training programs or courses in development: Biomedical, Avionics.
27
+
28
+ ADMISSION REQUIREMENTS of ELECTRONICS AND TELECOMMUNICATION ENGINEERING:
29
+ - Possession of a Certificate of Secondary Education Examinations (CSEE) with a minimum of FOUR passes, of which TWO must be among the following subjects: Mathematics, Physics/Engineering Science, Biology, and Chemistry; excluding religious subjects.
30
+ - OR Possession of a National Vocational Award (NVA) Level III in Electrical, Electronics, Telecommunication, Mechanical, and related fields offered by VETA and a Certificate of Secondary Education Examination (CSEE) with at least two passes.
31
+
32
+ ADMISSION REQUIREMENTS of ELECTRICAL AND INDUSTRIAL AUTOMATION ENGINEERING:
33
+ - Possession of a Certificate of Secondary Education Examinations (CSEE) with a minimum of FOUR passes, of which TWO must be among the following subjects: Mathematics, Physics/Engineering Science, Biology, and Chemistry; excluding religious subjects.
34
+ - OR Possession of a National Vocational Award (NVA) Level III in Electrical, Electronics, Telecommunication, Mechanical, and related fields offered by VETA and a Certificate of Secondary Education Examination (CSEE) with at least two passes.
35
+
36
+ ADMISSION REQUIREMENTS of ELECTRICAL AND COMPUTER ENGINEERING PROGRAMS:
37
+ - Possession of a Certificate of Secondary Education Examinations (CSEE) with a minimum of FOUR passes, of which TWO must be among the following subjects: Mathematics, Physics/Engineering Science, Biology, and Chemistry; excluding religious subjects.
38
+ - OR Possession of a National Vocational Award (NVA) Level III in Electrical, Electronics, Telecommunication, Mechanical, and related fields offered by VETA and a Certificate of Secondary Education Examination (CSEE) with at least two passes.
39
+
40
+ ADMISSION REQUIREMENTS of ELECTRICAL AND RENEWABLE ENERGY ENGINEERING:
41
+ - Possession of a Certificate of Secondary Education Examinations (CSEE) with a minimum of FOUR passes, of which TWO must be among the following subjects: Mathematics, Physics/Engineering Science, Biology, and Chemistry; excluding religious subjects.
42
+ - OR Possession of a National Vocational Award (NVA) Level III in Electrical, Electronics, Telecommunication, Mechanical, and related fields offered by VETA and a Certificate of Secondary Education Examination (CSEE) with at least two passes.
43
+
44
+
45
+ APPLICATION FOR EITHER DIPLOMA COURSE OR SHORT COURSE
46
+ - You can apply for Diploma Course through this link https://kiitec.ac.tz/apply-here/
47
+ - You can apply for short Course through this link https://kiitec.ac.tz/apply-here/
48
+
49
+ Fee structure and Mode of Payment for Diploma Programs:
50
+ - The first semester fee is 695,000 Tsh and can be paid in two installments before the end of the semester.
51
+ - The second semester fee is 625,000 Tsh and can be paid in two installments before the end of the semester.
52
+ - The fees should be paid through the Bank of ABSA, Account number 002-4001687, Account Name KIITEC.
53
+
54
+ KIITEC students wear uniforms. The uniforms consist of light blue shirts and dark blue sweaters, dark blue skirts, and dark blue trousers.
55
+
56
+ KIITEC Vision:
57
+ To become a leading provider of quality technical education and training to empower the youth of Tanzania and the Eastern Africa region.
58
+
59
+ KIITEC Mission:
60
+ - To provide quality hands-on technical training for students in ICTs, Electrical, Renewable Energies, Industrial Automation, and related disciplines.
61
+ - To conduct quality research and consultancy in these fields.
62
+ - To promote the development and usage of modern technology that meets national, regional, and international needs and standards through skills and practical-oriented training.
63
+
64
+ KIITEC Values:
65
+ - Hard work and excellence
66
+ - Honesty
67
+ - Respect
68
+ - Responsibility
69
+ - Lifelong learning
70
+ - Innovation and creativity.
71
+
72
+ For contact information:
73
+ - Phone: +255 27 250 4384
74
+ - Mobile: +255 757 845 118
75
+ - Email: info@kiitec.ac.tz
76
+ - P.O. Box 3172, Arusha
77
+ """
78
+
79
  def generate_response(user_input):
80
  response = openai.ChatCompletion.create(
81
  model="gpt-3.5-turbo",
 
85
  {"role": "user", "content": user_input},
86
  ]
87
  )
88
+
89
+ response['choices'][0]['message']['content']
90
+ if "kiitec" in user_input.lower():
91
+ response += "\n\n" + "Here is some information about KIITEC:\n" + KIITEC_CONTENT
92
+
93
+ return response
94
 
95
  def main():
96
  st.title("Chatbot Assistant")