Capstone Project Final Report - 19BCE2549
Capstone Project Final Report - 19BCE2549
Bachelor of Technology
in
by
Nishit Shah
19BCE2549
Abhishek Mukherjee
19BCE0598
Dr. Ilayaraja V
VIT , Vellore
May, 2023
DECLARATION
Place: Vellore
This is to certify that the thesis entitled “A Smart Conversational Al Chatbot to guide
college freshers'' submitted by Nishit Shah (19BCE2549), School of Computer Science
and Engineering, VIT, for the award of the degree of Bachelor of Technology in Computer
Science and Engineering, is a record of bonafide work carried out by him / her under my
supervision during the period, 01. 07. 2022 to 30.04.2023, as per the VIT code of academic
and research ethics.
The contents of this report have not been submitted and will not be submitted either
in part or in full, for the award of any other degree or diploma in this institute or any other
institute or university. The thesis fulfills the requirements and regulations of the University
and in my opinion meets the necessary standards for submission.
Place : Vellore
Date : Signature of the Guide
Dr Vairamuthu S
ACKNOWLEDGEMENTS
We would like to express my sincere gratitude to VIT University for providing us with the
opportunity to work on this capstone project. The resources and support provided by the
university have been instrumental in the successful completion of this project.
We would also like to extend my heartfelt thanks to the Chancellor of VIT University Dr.
G. Viswanathan for his guidance and support throughout this project. His vision and
leadership have been a constant source of inspiration for us.
We would also like to express our appreciation to our project guide Dr.Ilayaraja V, who
has been instrumental in guiding us through the project. His expertise and insights have
been invaluable in shaping the direction of this project.
Finally, we would like to thank all the faculty members and staff of VIT University for
their support and encouragement. Their contributions have been essential to the success of
this project, and we are grateful for their assistance.
Abhishek Mukherjee
(19BCE0598)
Nishit Shah
(19BCE2549)
ii
Executive Summary
The project is a Question-Answering (QA) chatbot for freshers at VIT university. The
chatbot would help students to find information related to academics, events, fests, and the
FFCS course registration system,etc. The chatbot is based on the BERT (Bidirectional
Encoder Representations from Transformers) model and Squad (Stanford Question
Answering Dataset) project dataset. The chatbot works on the principle of 'Reading
Comprehension' to extract the required information from the dataset and provide accurate
answers to users' queries.
This chatbot uses retrieval-based methods to provide specific information according to the
user's needs. Retrieval-based chatbots are effective in providing specific answers to user
queries. The Squad dataset is a rich source of training and evaluation data, which can be
used to fine-tune the BERT model to generate contextual embeddings for the question-
answer pairs.
The chatbot takes user queries, retrieves relevant passages from the dataset, and provides
accurate answers in the English language. This system streamlines the process of resolving
students' questions by providing a single point of contact. The dataset utilized is the official
information extracted from the university's academic regulation document and website.
Overall, the project has the potential to be a useful tool for new students at VIT university.
iii
CONTENTS Page
No.
Acknowledgement i
Executive Summary ii
List of Figures iv
List of Tables v
Abbreviations vi
1 INTRODUCTION 1
1.1 Theoretical Background 1
1.2 Motivation 1
1.3 Aim of the Proposed Work 1
1.4 Objective(s) of the Proposed Work 2
2. Literature Survey 2
2.1. Survey of the Existing Models/Work 2
2.2. Summary/Gaps identified in the Survey 7
3. Overview of the Proposed System 9
3.1. Introduction and Related Concepts 9
3.2. Framework, Architecture or Module for the Proposed System 10
3.3. Proposed System Model 11
4. Proposed System Analysis and Design 12
4.1. Introduction 12
4.2. Requirement Analysis 13
4.2.1. Functional Requirements 13
4.2.1.1. Product Perspective 13
4.2.1.2. Product features 13
4.2.1.3. User characteristics 13
4.2.1.4. Assumption & Dependencies 14
4.2.1.5. Domain Requirements 14
4.2.1.6. User Requirements 14
4.2.2. Non Functional Requirements 15
4.2.2.1. Product Requirements 15
4.2.2.1.1. Efficiency (in terms of Time and Space) 15
4.2.2.1.2. Reliability 15
iii
4.2.2.1.3. Portability 15
4.2.2.1.4. Usability 15
4.2.2.2. Organizational Requirements 15
4.2.2.2.1. Implementation Requirements 15
4.2.2.2.2. Engineering Standard Requirements 16
4.2.2.3. Operational Requirements 17
● Economic 17
● Environmental 17
● Social 17
● Political 17
● Ethical 17
● Sustainability 17
● Legality 18
● Inspectability 18
4.2.3. System Requirements 18
4.2.3.1. H/W Requirements 18
4.2.3.2. S/W Requirements 18
5. Results and Discussion 18
6. References 24
APPENDIX A
iv
List of Figures
2 ER Diagram 11
3.1 Instructions 21
3.2 Sample Questions 21
3.3 Categories 22
List of Tables
List of Abbreviations
NLP Natural Language Processing
BERT Bidirectional Encoder Representations from
Transformer
SQuAD Stanford Question Answering Dataset
FFCS Fully Flexible Credit System
VIT Vellore Institute of Technology
LSTM Long Short Term Memory
DNN Deep Neural Network
API Application Programming Interface
AI Artificial Intelligence
ELMo Embedding from Language Model
MRC Machine Reading Comprehension
UI User Interface
LLM Large Language Model
AWS Amazon Web Services
CI/CD Continuous Integration / Continuous
Deployment
vii
1. INTRODUCTION
Instead of offering direct contact with a real human agent, a chatbot or chatterbot is a
software programme that is used to conduct an online chat conversation using text or text-to-
speech. Many websites have installed a chatbot to satisfy the user’s dependability. It has
been heavily utilized to answer user inquiries. It is used in e-commerce,banking and every
other website where user queries need to be resolved. It's an interactive way to help users
without manual intervention. Chatbots are used in dialogue systems for a variety of tasks,
including information collecting, request routing, and customer service. While some chatbot
solutions employ advanced natural language processing, word categorization, and AI, others
only scan for broad keywords and construct responses using standard expressions taken from
a connected library or database.
1.2. Motivation
When freshers join college they need to figure out a lot of things in VIT like the location of
the academic buildings, events and fests and FFCS, the unique course registration system in
VIT. The students may have to approach different departments or authorities for answers to
their queries, resulting in time wastage and high inconvenience. Even though the resources
may be available in the student’s portal or the university’s official website, the course of
action involved in finding the correct context in a long handbook is a tedious and inefficient
process. The worst case scenario would be no resources available or concerned authority
absent during urgent cases. Question answering (QA) chatbots have become increasingly
popular as a means of providing personalized, timely and accurate information to users. In
recent years, there has been significant progress in the development of QA systems using
deep learning techniques, particularly the BERT (Bidirectional Encoder Representations from
Transformers) model.
The aim of the work is to build a chatbot that serves as a one-stop solution for college
freshers to get their queries answered. The chatbot will be integrated with Vtop and accessible
to all students, with the primary target users being college freshers. The goal is to provide a
2
smooth, reliable and accurate process for students to get their questions answered without
having to approach specific authorities or seniors.
Solving queries of ambiguous freshers is our main objective to build this product. As seniors,
we observed many freshers asking questions regarding various aspects of college. We thought
of making a one-stop solution for all queries for freshers so that they don't have to approach a
specific authority or seniors to get their inquiries answered. Whatever the question may be,
they rely on the chatbot which would be very accessible to all freshers. Our target users are
college freshers, however, we do not intend to totally exclude seniors. Since we aim to
integrate to Vtop, all students must be able to access it. At the end of building the product, we
expect a smooth process for the student to get questions answered, and make it usable and
highly reliable. Additionally, we expect the chatbot to give the most accurate answer.
2. Literature Survey
Feasibility Study of a Kim, J., Chung, S., Moon, The researchers have
BERT-based Question S., & Chi, S. (2022, developed a chatbot to
Answering Chatbot for December) extract specific information
Information Retrieval from from construction
Construction Specifications specifications as a user
wants. The model is built on
top of the BERT language
model. By taking advantage
of the pre-trained BERT,
user-wanted information
was successfully extracted
from construction
specifications.
Intelligent College Enquiry Nikhath, A. K., Rab, M. A., The researchers have
Bot using NLP and Deep Bharadwaja, N. V., Reddy, developed an ‘Intelligent
Learning based techniques L. G., Saicharan, K., & Enquiry Bot’ to answer their
Reddy, C. V. M. (2022, user’s queries with valid
January) responses. The model used
for chatbots used Long Short
Term Memory (LSTM)
networks, a special kind of
Deep Neural Networks
(DNN). The paper goes
through various stages of
development of the chatbot.
Chatbot for college website Shivam, K., Saud, K., The authors propose a
Sharma, M., Vashishth, S., chatbot application,
& Patil, S. (2018) developed with Facebook
API and webhook, that
makes college related
information easily accessible
to the students. This saves
time and reduces the work
of staff and administration.
Moreover, it can be used by
students as well as parents to
5
Implementation of a chatbot This paper summarizes the The chatbot could not
system using AI and NLP fast and reliable college answer queries from all the
chatbot developed to fetch domains of college such as
information regarding sports and medical facilities,
examinations and hence reducing the benefits
placements in the university of this chatbot.
and displays answers to the
students.
Framework for COVID-19 chatbot that can answer robustness and accuracy. It
queries related to COVID- can answer only common
19. Their proposed system questions related to COVID-
has been trained and tested 19.
with the Stanford Question
Answering Dataset.
parents. It is based on
Natural Language
Processing and Long Short
Term Memory.
Chatbot for college website A web application based Used database to store
chatbot to answer queries answers, questions,
related to college in order to keywords and feedback
reduce the workload of messages. This makes the
student and increasing time chatbot a restricted product,
and energy efficiency a only prescribed set of
questions could be
answered.
Techniques chatbots and how two main only theoretically and does
categories handle not focus on algorithms.
conversation context.
Quiz Generation Chatbot for based on the uploaded questions from consolidated
BERT for question The authors have focused on Lack of understanding the
answering on SQuAD 2.0. machine reading mechanism to balance the
Stanford University Report. comprehension and BERT model’s performance on
for question answering. both has-answer and no-
answer predictions.
Towards interpreting BERT In this paper, the authors Potential for further research
for reading comprehension have introduced a new on the purpose and
based QA. preliminary layer which understanding the working
focuses more on contextual mechanism of BERT
understanding and relating to accuracy.
enhancing the answer
prediction.
Firstly, the chatbot displays a list of ten categories related to VIT with a designated number
for each of them. The categories are course registration/FFCS, hostels, examinations/
assessments, Pass/Fail criteria, facilities, credits, semester, summer/weekend/intersession
semesters, curriculum and events. The user is supposed to enter the category number from
which they want to ask questions. On entering their desired number, the related context to
that category is sent for processing as the knowledge base. However, hostels and facilities
have subcategories so there’s an additional step of asking for the designated number for
subcategories. Finally, the user is asked to enter his/her query related to the category chosen.
The question must be clear and specific with minimum grammatical errors.
Based on the categories mentioned during question processing and user’s choice, the
relevant text is chosen as context. The model is pre-trained on Bidirectional Encoder
Representations from Transformers (BERT) which helps it with contextual embeddings to
get the desired answer. Once the relevant context has been chosen to get the answer for the
query, the reader (model) reads through the context and extracts the answer by marking the
start and ending positions of the answer. The text enclosed within the markers is further used
by answer processing to be displayed to the user.
11
After the query has been entered and the related knowledge base has been chosen, both of
them are sent for answer extraction with help of our model. The answer which is extracted is
then further refined to display the most accurate answer.
Fig 2 ER Diagram
12
One of the main reasons for the good performance of BERT on different NLP tasks was the
Semi-Supervised Learning. This means the model is trained for a specific task that enables it
to understand the patterns of the language. After training the model(BERT) has language
processing capabilities that can be used to empower other models that we build and train
using supervised learning. ELMo Word Embedding for a word is the projection of a word to
a vector of numerical values based on its meaning, ELMo was different from these
embeddings because it gives embedding to a word based on its context i.e contextualized
word-embeddings.To generate embedding of a word, ELMo looks at the entire sentence
instead of a fixed embedding for a word. Elmo uses a bidirectional LSTM trained for the
specific task to be able to create those embeddings. This model is trained on a massive
dataset in the language of our dataset, and then we can use it as a component in other
architectures that are required to perform specific language tasks.
We have ten categories in our chatbot from which the user can ask questions. The categories
are course registration/FFCS, hostels, examinations/ assessments, Pass/Fail criteria,
facilities, credits, semester, summer/weekend/intersession semesters, curriculum and events.
For each of these categories, we have collected data from the official academic regulations
file from VTOP and VIT’s official website: https://vit.ac.in/ . This information has been
obtained from these resources and adjusted to the application requirements, without any
alteration in the meaning. The BERT model has already been trained on SQuAD 2.0 dataset.
13
SQuAD 2.0 (Stanford Question Answering Dataset) is a reading comprehension dataset that
consists of over 100,000+ examples of question-context-answer triplets.
Our model works to find the answer using a technology called Machine Reading
Comprehension. Machine reading comprehension (MRC) is a technology that scans
documents and extracts meaning from the text, just like a human reader. MRC uses neural
networks to model complex interactions between the context and the query, and to infer
answers from different parts of the document.
it's all legally sourced. The website also does not store any user data.
● Inspectability
The website does not record previous questions asked by a user or any
such data related to the user. The website has some debugging checks
to handle errors or bad responses. The website does not have any
separate testing environment.
the 19th and 20th centuries. Its precise meaning continues to be debated by scholars. Some
writers, such as Edward Said, use the term more broadly to describe any system of
domination and subordination organized with an imperial center and a periphery.
Question: Imperialism is responsible for the rapid spread of what?
Ground Truth Answers: technologies and ideas technologies and ideas technologies and
ideas technologies and ideas technologies and ideas.
Prediction: technologies and ideas Ground truth Answers are the expected answers from the
context. Prediction- answer predicted by chatbot Here are the question-answer pairs our
model has tested on our dataset.
Our chatbot has been developed as a web application built on HTML and CSS. On accessing
the chatbot, the students are first shown a few instructions and a set of examples on how the
queries must be asked to obtain an accurate answer.
After reading the instructions, they are given a list of categories they can choose from to ask
questions. On choosing the category number they can ask questions related to that chosen
category. The chatbot replies with the most accurate answer.
After answering, the user is given a continuation prompt with three choices. They can ask
another question from the same category, or change the category or end the chat. Based on
the user’s choice, the chatbot repeats a certain set of functions unless the user wants to end
the chat.
a. Events -
Q: What is the purpose of Riviera?
A: To give our students a platform to showcase and shape their talent in various
technical and managerial areas.
b. Hostels -
Q: Can a student be permitted to stay as a day boarder outside the hostel?
A: No student will be permitted to stay as Day Boarder outside the campus unless a
parent stays with them.
c. Facilities -
Q: When are doctors available?
A: full time and part-time doctors are employed to render 24-hour service
20
d. Semesters -
Q: When are fall and winter semesters?
A: the fall semester will be from July to November and winter semester from
December to April.
e. Credits -
Q: What is the maximum and minimum credits allowed to register?
A: Students can register for a maximum of 27 credits or a minimum of 16 credits in a
regular semester
f. Summer/Weekend/Intersession Semester -
Q: How many credits are allowed in the summer semester?
A; between 6 and 8
g. Curriculum -
Q: What is the use of program elective courses?
A: courses give an opportunity for students to satisfy their aspirations in other
disciplines
h. Examinations/Assessments -
Q: How is a student's performance evaluated?
A: sequence of continuous assessment tests, assignments that include quizzes,
seminars, group discussions, class/take-home tasks, and Final Assessment Test
i. Pass/Fail criteria -
Q: If a student has cleared theory component can he register next level course?
A: if the student has cleared the theory component, he/she will be permitted to
register the next level course
j. FFCS/Course Registration -
Q: Can a student improve their grades?
A: who wish to improve their grades will be permitted to register the same course
again during a subsequent Course Registration process.
21
6. References
● Rao, G. M., Tripurari, V. S., Ayila, E., Kummam, R., & Peetala, D. S. (2022,
February). Smart-Bot Assistant for College Information System. In 2022 Second
International Conference on Artificial Intelligence and Smart Energy (ICAIS) (pp.
693-697). IEEE.
● Koundinya, H., Palakurthi, A. K., Putnala, V., & Kumar, A. (2020, July). Smart
College Chatbot using ML and Python. In 2020 International Conference on System,
Computation, Automation and Networking (ICSCAN) (pp. 1-5). IEEE.
● Shivam, K., Saud, K., Sharma, M., Vashishth, S., & Patil, S. (2018). Chatbot for
college website. Int J Comp Technol, 5(6), 74-77.
● Vikas, G. S. S., Kumar, I. D., Shareef, S. A., Roy, B. R., & Geetha, G. (2021,
October). Information Chatbot for College Management System Using Multinomial
Naive Bayes. In 2021 2nd International Conference on Smart Electronics and
Communication (ICOSEC) (pp. 1149-1153). IEEE.
● Rawat, B., Bist, A. S., Rahardja, U., Aini, Q., & Sanjaya, Y. P. A. (2022, September).
Recent Deep Learning Based NLP Techniques for Chatbot Development: An
Exhaustive Survey. In 2022 10th International Conference on Cyber and IT Service
Management (CITSM) (pp. 1-4). IEEE.
● Adamopoulou, E., & Moussiades, L. (2020, June). An overview of chatbot
technology. In IFIP International Conference on Artificial Intelligence Applications
and Innovations (pp. 373-383). Springer, Cham.
● Singh, S., & Thakur, H. K. (2020, June). Survey of various AI Chatbots based on
technology used. In 2020 8th International Conference on Reliability, Infocom
Technologies and Optimization (Trends and Future Directions)(ICRITO) (pp. 1074-
1079). IEEE.
● Maroengsit, W., Piyakulpinyo, T., Phonyiam, K., Pongnumkul, S., Chaovalit, P., &
Theeramunkong, T. (2019, March). A survey on evaluation methods for chatbots. In
Proceedings of the 2019 7th International conference on information and education
technology (pp. 111-119).
● Sreelakshmi, A. S., Abhinaya, S. B., Nair, A., & Nirmala, S. J. (2019, November). A
question answering and quiz generation chatbot for education. In 2019 Grace Hopper
Celebration India (GHCI) (pp. 1-6). IEEE.
25
● Hussain, S., Ameri Sianaki, O., & Ababneh, N. (2019, March). A survey on
conversational agents/chatbots classification and design techniques. In Workshops of
the International Conference on Advanced Information Networking and Applications
(pp. 946-956). Springer, Cham.
● Lalwani, T., Bhalotia, S., Pal, A., Rathod, V., & Bisen, S. (2018). Implementation of
a Chatbot System using AI and NLP. International Journal of Innovative Research in
Computer Science & Technology (IJIRCST) Volume-6, Issue-3.
● Rahman, A. M., Al Mamun, A., & Islam, A. (2017, December). Programming
challenges of chatbot: Current and future prospective. In 2017 IEEE Region 10
Humanitarian Technology Conference (R10-HTC) (pp. 75-78). IEEE.
● Caldarini, G., Jaf, S., & McGarry, K. (2022). A literature survey of recent advances
in chatbots. Information, 13(1), 41.
● Jimoh, K. O., Adebayo, O. Y., Akinfenwa, T. O., & Abimbola, I. B.
DEVELOPMENT OF A CLOUD BASED STUDENT INFORMATION CHATBOT
SYSTEM.
● Nikhath, A. K., Rab, M. A., Bharadwaja, N. V., Reddy, L. G., Saicharan, K., &
Reddy, C. V. M. (2022, January). An Intelligent College Enquiry Bot using NLP and
Deep Learning based techniques. In 2022 International Conference for Advancement
in Technology (ICONAT) (pp. 1-6). IEEE.
● Feasibility Study of a BERT-based Question Answering Chatbot for Information
Retrieval from Construction Specifications Kim, J., Chung, S., Moon, S., & Chi, S.
(2022, December).
● A Proposed Chatbot Framework for COVID-19 Amer, E., Hazem, A., Farouk, O.,
Louca, A., Mohamed, Y., & Ashraf, M. (2021, May). A proposed chatbot framework
for COVID-19. In 2021 International Mobile, Intelligent, and Ubiquitous Computing
Conference (MIUCC) (pp. 263-268). IEEE
● Zhang, Y., & Xu, Z. (2019). BERT for question answering on SQuAD 2.0. Stanford
University Report
● Shivam, K., Saud, K., Sharma, M., Vashishth, S., & Patil, S. (2018). Chatbot for
college website. Int J Comp Technol, 5(6), 74-77.
● Ramnath, S., Nema, P., Sahni, D., & Khapra, M. M. (2020). Towards interpreting
BERT for reading comprehension based QA. arXiv preprint arXiv:2010.08983.
26
APPENDIX A
File: index.html
<script src='https://use.fontawesome.com/releases/v5.0.13/js/all.js'></script>
<script>
get('#ins').addEventListener('click', function () {
insmodal.style.display = 'block';
})
get('#closeins').addEventListener('click', function () {
insmodal.style.display = 'none';
})
texts.push(msgText);
console.log(texts);
appendMessage(PERSON_NAME, PERSON_IMG, "right", msgText);
if (texts.length == 1) {
if (!isNaN(msgText) && msgText < 14) {
appendMessage("Chatbot", BOT_IMG, "left", "Enter your query");
}
else if (msgText > 13 || isNaN(msgText) || msgText < 1) {
appendMessage("Chatbot", BOT_IMG, "left", "Invalid Input, please enter again")
texts.pop()
}
}
else if (texts.length == 2) {
$.ajax({
url: '/',
type: 'POST',
headers: { 'X-CSRFToken': csrf_token },
contentType: 'application/json',
data: JSON.stringify({ choice: texts[0] - 1, question: texts[1] }),
28
}
myFunction().then(
function () {
appendMessage("Chatbot", BOT_IMG, "left", `1.
${prompts[categories[parseInt(texts[0]) - 1]]} </br> 2. Ask from another category </br> 3.
End the chat`)
},
);
}
});
}
else if (texts.length == 3) {
if (msgText == "1") {
appendMessage("Chatbot", BOT_IMG, "left", "Enter your query");
choice = texts[0]
texts = []
texts.push(choice);
}
else if (msgText == "2") {
texts = []
const cat = "The categories are :- </br> 1. Events/Clubs and Chapters </br> 2. Hostel
Counselling </br> 3. Paid Facilities </br> 4. Free Facilities</br> 5. Chettinad Hospital </br>
6. Semesters </br> 7. Credit System </br> 8. Summer/Weekend/Intersesion semester </br>
9. Curriculum </br> 10. Examinations/Assessments </br> 11. Pass/Fail Criteria </br> 12.
FFCS/Course Registration </br> 13. Attendance/Leave </br> Enter Category number for your
query."
appendMessage("Chatbot", BOT_IMG, "left", cat);
}
else if (msgText == "3") {
appendMessage("Chatbot", BOT_IMG, "left", "Thank you for using chatbot");
texts = []
}
else {
appendMessage("Chatbot", BOT_IMG, "left", "Invalid Input, please enter again");
texts.pop()
}
}
msgerInput.value = "";
});
29
<div class="msg-bubble">
<div class="msg-info">
<div class="msg-info-name">${name}</div>
<div class="msg-info-time">${formatDate(new Date())}</div>
</div>
<div class="msg-text">${text}</div>
</div>
</div>
`;
msgerChat.insertAdjacentHTML("beforeend", msgHTML);
msgerChat.scrollTop += 500;
}
// Utils
function get(selector, root = document) {
return root.querySelector(selector);
}
function formatDate(date) {
const h = "0" + date.getHours();
const m = "0" + date.getMinutes();
return `${h.slice(-2)}:${m.slice(-2)}`;
}
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-
MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
</body>
</html>
File: context.py
facilities_paid = 'The swimming facility costs Rs 4720 and its opening time is 6:30 am- 8:30
am and 4:30 pm-7:30 pm. Indoor AC gym and Trendset AC gym costs Rs 4720 and Fitty AC
gym costs Rs 5900. Its opening time is 6 am - 9 am and 3 pm - 8 pm. The squash facility costs
30
Rs 3836 and its opening time is 6 am - 9 am and 3 pm - 8 pm. The karate facility costs Rs 2950
and its opening time is every Tuesday, Thursday and Friday from 6.30 pm to 7.30 pm. The
synthetic tennis facility costs Rs 3836 and its opening time is 6 am - 9 am and 3 pm - 8 pm.
The snooker facility costs Rs 3836 and its opening time is 2 pm - 8 pm. The shuttle service
costs Rs 15 from one point to any point within campus.'
passing = "A student receives a N grade if they have not passed any of the course's individual
components. Courses having F grade are considered as backlog. A course with 'F' grade has
to be re- registered in the subsequent semesters or special terms to clear the backlog. Students
with a F grade are eligible to register the next level course. With N grade, if the student has
cleared the theory component, he/she will be permitted to register the next level course (pre-
requisite is met). Both F and N have to be cleared by re-registering the same course in the
subsequent semester/inter semester/ summer semester / subsequent intra-semester. If the
student has cleared in one or more components but got N grade in that course, then the cleared
components are exempted from re-registration. Re-registration fee will be as per the university
norms existing at the time of reregistration (whole or a component of a course). Such a re-
registration fee is also applicable for project-only courses. When a course is re-registered
wholly, all earlier course evaluation marks shall be treated as cancelled/ reset. If a student fails
in a course due to lack of marks in the lab/project component of an embedded course, the
student has to re-register the lab/project component alone. Courses having ‘W’ grade (course
withdraw) will not be considered as backlog. Students who are debarred from FAT will be
given a N grade, for that course, in the grade sheet. If a student has secured a minimum of 40%
marks in the theory FAT alone has secured a minimum of 50% marks out of the total marks
awarded to the laboratory and/or project components and has secured a minimum of 50%
marks out of the grand total marks awarded to the course then he/she is declared passed. If a
student receives a F grade in a program elective(PE) course, and if the student wishes, he/she
is permitted to take another program elective(PE) course from the same basket, in lieu of
program elective(PE) course, the student had failed to clear, in subsequent semesters and clear
the new program elective(PE) course. If a student receives an ‘F’ grade in a university
elective(UE) course, and if the student wishes, he/she is permitted to take another university
elective(UE) course instead of the university elective(UE) course the student had failed to
qualify, in subsequent semesters and clear the new course. The student is permitted to choose
a program elective(PE) course from his/her curriculum instead of a failed university
elective(UE) course. An 'F' grade is given for a course if all of the course's individual
components are passed but the overall grade is below the passing range."
31
File : api.py
from flask import Flask, request, jsonify, render_template
from flask_cors import CORS
from bert import QA
from flask_wtf.csrf import CSRFProtect
import requests
import context
app = Flask(__name__)
app.config['SECRET_KEY'] = 'any secret string'
csrf = CSRFProtect(app)
csrf.init_app(app)
CORS(app)
model = QA("model")
@app.route('/', methods=['POST'])
def send_request():
url = 'http://localhost:8000/'
choice = request.json["choice"]
q = request.json["question"]
data = {'choice': choice, 'question': q}
if(not data['question'].endswith('?')):
data['question'] += '?'
print(data)
response = requests.post(url, json=data)
answer = model.predict(context.contexts[int(choice)], q)
print(answer)
if(answer['answer'] == '.'):
answer['answer'] = "Sorry, answer not found. Please rephrase the question and make sure
you have followed the instructions."
@app.route("/")
32
def home():
return render_template('index.html')
if __name__ == "__main__":
app.run('0.0.0.0', port=8000)