CoolFace
Apppublic

Walterchamy/Virtual_Assistant_v1

sourceHugging Facemitupdated 2y agoView on Hugging Face
8likes
app.py142 linesDownload Raw Back to root
1import os2import openai3from gtts import gTTS4import streamlit as st5from openai import OpenAI6 7client = OpenAI(8  api_key=os.environ['OPENAI_API_KEY'],  9)10 11 12 13KIITEC_CONTENT = """14 15KIITEC is a technical institution registered by NACTE (REG/EOS/027) based in Moshono, Arusha next to Masai Camp.16 17The 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.18 19The institute in 25 november 2023 there is graduation ceremony for deiplomaa course which they started 2020 there diploma programs in courses that are offered in institute20 21Following 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.22 23Resting 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.24 25KIITEC specializes in diploma programs including:26- Electrical & Computer Engineering27- Electrical & Industrial Automation28- Electronics & Telecommunication Engineering29- Electrical & Renewable Energies30 31Short course programs offered by KIITEC include:32- Computer Application33- IT & System Security34- Electrical Domestic & Solar PV System Installation35 36Future training programs or courses in development: Biomedical, Avionics.37 38ADMISSION REQUIREMENTS of ELECTRONICS AND TELECOMMUNICATION ENGINEERING:39- 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.40- 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.41 42ADMISSION REQUIREMENTS of ELECTRICAL AND INDUSTRIAL AUTOMATION ENGINEERING:43- 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.44- 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.45 46ADMISSION REQUIREMENTS of ELECTRICAL AND COMPUTER ENGINEERING PROGRAMS:47- 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.48- 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.49 50ADMISSION REQUIREMENTS of ELECTRICAL AND RENEWABLE ENERGY ENGINEERING:51- 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.52- 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.53 54 55APPLICATION FOR EITHER DIPLOMA COURSE OR SHORT COURSE56- You can apply for Diploma Course through this link https://kiitec.ac.tz/apply-here/57-  You can apply for short Course through this link https://kiitec.ac.tz/apply-here/58 59Fee structure and Mode of Payment for Diploma Programs:60- The first semester fee is 695,000 Tsh and can be paid in two installments before the end of the semester.61- The second semester fee is 625,000 Tsh and can be paid in two installments before the end of the semester.62- The fees should be paid through the Bank of ABSA, Account number 002-4001687, Account Name KIITEC.63 64KIITEC students wear uniforms. The uniforms consist of light blue shirts and dark blue sweaters, dark blue skirts, and dark blue trousers.65 66Kiitec has tutors and staff members are not only highly qualified professionals in their respective fields but also dedicated mentors, guiding students towards academic success and personal growth,and those tutors are:67-Tumaini Lyimo working as head of Computer department and tutor of computer software , Artificial Intelligence and other fields related to computer68-Makori Makori a tutor of computer hardware , computer application and other fields related to computer69-James Makyao a tutor of Communicaton skills and Language70-Senkoro Mrutu a tutor of Telecommunication , Elecronics and robotics71-Bertha Mbugha a tutor of Networking ,Telecommunication and electronics72-Annastazia Mlacha a tutor of Mathematics , Electrical and Electronics73-Albert Mtana working as head of Industrial Automation department and tutor of Electrical and Industrial74-Elias Mwaimu a tutor of Electrical and Industrial Automation75-Samson a tutor of Electrical and Industrial Automation76 77KIITEC has  administration department were there members in the department as follows:78- Father Sebastian working as Director of Kiitec Institution and also as current Principle replacing Mr.Gerald Sambayuka who has recently retire at kiitec institution79- Trace Kavishe working as Admin at kiitec institution80- Hannah Pondo working as Buser at kiitec institution81KIITEC Vision:82To become a leading provider of quality technical education and training to empower the youth of Tanzania and the Eastern Africa region.83 84KIITEC Mission:85- To provide quality hands-on technical training for students in ICTs, Electrical, Renewable Energies, Industrial Automation, and related disciplines.86- To conduct quality research and consultancy in these fields.87- To promote the development and usage of modern technology that meets national, regional, and international needs and standards through skills and practical-oriented training.88 89KIITEC Values:90- Hard work and excellence91- Honesty92- Respect93- Responsibility94- Lifelong learning95- Innovation and creativity.96 97For contact information:98- Phone: +255 27 250 438499- Mobile: +255 757 845 118100- Email: info@kiitec.ac.tz101- P.O. Box 3172, Arusha102"""103def generate_response(user_input):104    response = client.chat.completions.create(105        model="gpt-3.5-turbo",106        messages=[107            {"role": "system", "content": """You are a highly skilled AI assistant that can understand and answer questions in a natural and intelligent manner.108            so All your answers should be in Swahili or English..109            Consider the language that the user has asked with, and your kiitec virtual assistant your designed or created by WALTER RICHARD 110            for more information about WALTER can call +255 624 844 661 or email walterchamy64@gmail.com 111            So, here we start... Your virtual assistant of DON BOSCO KIITEC. You will reply to the queries that the user might ask!\n\n""" + KIITEC_CONTENT},112            {"role": "user", "content": user_input}113        ]114    )115    return response.choices[0].message.content116 117    118def text_to_speech(text):119    tts = gTTS(text=text, lang=('en'))120    tts.save('output.mp3')121 122    st.audio("output.mp3")123 124 125def main():126    col1, col2 = st.columns([1, 4])127    128    with col1:129        st.image('logo.png', caption=None, width=200, use_column_width=200)130    131    with col2:132        st.markdown("<h4 style='text-align: center; color: white;'>KILIMANJARO INTERNATIONAL INSTITUTE FOR TELECOMMUNICATION, ELECTRONICS & COMPUTERS</h4>", unsafe_allow_html=True)133    st.header("KIITEC VIRTUAL ASSISTANT")134    st.write("Welcome for questions concerning kiitec institution")135    user_input = st.text_input("Enter ur question:")136    if st.button("Answer"):137        with st.spinner("Generating Response...."):138            response_text = generate_response(user_input)139        st.write("Answer:", response_text)140        text_to_speech(response_text)141if __name__ == '__main__':142    main()