Professional Documents
Culture Documents
Innoventure Internship
PROJECT REPORT
2022 – 23
Institution:
1. Introduction
2. Problem Statement
3. Solution
3.1 System requirements for the project.
3.2 Flowchart of the project.
3.3 Frontend
3.4 Backend
4. Conclusion/Outcome:
5. Reference List
Solution https://drive.google.com/drive/folders/1A6Mlp_fpIcz_izcANJCNeMWyeXkBv
Proposed
2Bw?usp=drive_link
(video Link)
Link to the https://drive.google.com/drive/folders/1sfya5nXdjfHyIEjK3S_8r2cb2FEWk80
final challenge X?usp=drive_link
presentation
1. Introduction
1. Personalized Learning: Develop an AI system that tailors lessons and learning strategies
according to individual students' needs, taking into account their capabilities and
knowledge gaps. The system should provide personalized learning recommendations to
enhance the efficiency of each student's learning process and bridge gaps in their
understanding.
2. Automation of Administrative Tasks: Implement AI algorithms to automate repetitive
administrative tasks, such as grading, continuous assessment, assignment checking, and
responding to queries. By unburdening teachers from these manual tasks, they can gain a
comprehensive view of students' performance and dedicate more time to high-skilled
responsibilities.
3. Increased Accessibility: Utilize AI to facilitate remote learning, allowing students to
access educational platforms and lessons anytime, anywhere. By eliminating
geographical barriers, AI-enabled education enhances accessibility and enables students
with special needs or learning disabilities to benefit from personalized learning
experiences.
4. Smart Learning Content: Develop a digitized curriculum powered by AI that delivers
interactive, engaging, and simplified learning materials. The system should generate
visualizations, simulations, audios, videos, e-books, and visualized charts, while keeping
the content updated and customized to cater to different learning curves.
5. Virtual Assistants: Integrate virtual assistants, such as AI-powered chatbots, into the
learning system to provide real-time communication and support to students. These
virtual assistants should offer personalized outreach, insightful feedback on curricula, and
assist multiple students simultaneously.
This project aims to leverage ChatGPT and AI in education to address key challenges:
personalizing learning, automating administrative tasks, increasing accessibility, creating
smart learning content, and integrating virtual assistants to enhance the quality and efficiency
of education.
2. Solution
Our solution involves the development of a responsive chatbot for real-time communication
in the field of education. This chatbot will be designed to facilitate effective and dynamic
interactions between students, teachers, and educational resources, ultimately enhancing the
learning experience.
The system requirements for a chatbot can vary depending on the complexity of its
functionality and the specific use case. However, here are some common system
requirements for developing a chatbot:
Software Requirements:
Programming language: Choose a programming language suitable for developing the
chatbot (e.g., Python, Java, Node.js).
Frameworks and libraries: Utilize appropriate AI and NLP libraries or frameworks (e.g.,
TensorFlow, PyTorch, NLTK, spaCy).
Database: Set up a database to store and retrieve user data or conversation history if
needed.
Operating system: Ensure compatibility with the desired OS (Linux, Windows, etc.).
Natural Language Processing (NLP) Components:
NLP engine: Integrate an NLP engine for understanding and generating human-like
responses.
Web or mobile interface: Develop a user-friendly front-end interface for users to interact
with the chatbot.
Integration with messaging platforms: If applicable, integrate the chatbot with messaging
platforms like Facebook Messenger, Slack, or WhatsApp.
Security Requirements:
Data encryption: Implement secure data transmission and storage to protect user
information.
Authentication and authorization: Establish user authentication and authorization
protocols to ensure data security.
Regular updates and security patches: Keep the chatbot software up to date to address
security vulnerabilities.
Scalability:
Design the chatbot system to be scalable, capable of handling a growing number of users
and interactions.
Integration:
Provide comprehensive documentation for users and developers to understand how to use
and extend the chatbot's capabilities.
These are general requirements, and the specific needs of your chatbot project may vary.
It's crucial to conduct a detailed analysis of your project's objectives and constraints to
determine the precise system requirements.
3.3 Overview
EduAI
EduAI is an intelligent Python chatbot designed to assist users in learning about various
programming languages. By simply inputting the name of a language, users can access a
wealth of information and resources. What sets EduAI apart is its text-to-speech feature,
enhancing the accessibility of the tool for visually impaired or differently-abled
individuals. This feature ensures that learning programming languages is an inclusive
experience, opening up opportunities for all. EduAI is not just a chatbot, but a step
towards making programming knowledge universally accessible.
Features
Provides information on a wide range of programming languages.
Offers intelligent, language-specific responses, enabling users to get precise
information tailored to their chosen language.
Features an easy-to-use input interface and organized HTML responses for a
seamless user experience.
Easily expandable to support additional languages.
Encourages collaboration and customization for further development.
Incorporates a text-to-speech feature, enhancing accessibility for visually
impaired or differently-abled individuals.
Install Dependencies:
Make sure you have Python installed. This chatbot is written in Python.
Install Gradio if you haven't already. You can use pip for this:
bash
pip install gradio
Also u need to install the google.generativeai module and gtts(Google-text-to-speech)
module :
bash
pip install google-generativeai
bash
pip install gtts
Ensure you have the necessary API key or authentication for the Google Generative AI
API.
Replace 'YOUR_API_KEY' in the code with your actual Google Generative AI API key.
Run the Script:
Run the Python script with the chatbot code.
Interact with the Chatbot:
Once the script is running, open a web browser and navigate to the provided local address
(e.g., http://127.0.0.1:7860/).
Enter a Programming Language:
Input the name of a programming language to interact with the chatbot.
Explore Responses:
The chatbot will generate and display responses about the specified programming
language and also an audio file which can be downloaded.
To run this project, you will need to add the following environment variables to your .env
file
API_KEY
def genResp(text):
completion = palm.generate_text(
model=model,
prompt=text,
temperature=0,
max_output_tokens=400 # The maximum length of the response
)
# Ensure the result is a string
if isinstance(completion.result, str):
return completion.result
else:
return str(completion.result)
infoQuestions = [
if language:
language = language.lower()
chatInterface.launch()
import os
file_uploaded_state = False
from typing import TypeVar
from langchain.embeddings import HuggingFaceEmbeddings#,
HuggingFaceInstructEmbeddings
from langchain.vectorstores import FAISS
import gradio as gr
from transformers import AutoTokenizer
from ctransformers import AutoModelForCausalLM
def get_faiss_store(faiss_vstore_folder,embeddings):
import zipfile
with zipfile.ZipFile(faiss_vstore_folder + '/' + faiss_vstore_folder + '.zip', 'r') as
zip_ref:
zip_ref.extractall(faiss_vstore_folder)
faiss_vstore = FAISS.load_local(folder_path=faiss_vstore_folder,
embeddings=embeddings)
os.remove(faiss_vstore_folder + "/index.faiss")
os.remove(faiss_vstore_folder + "/index.pkl")
global vectorstore
vectorstore = faiss_vstore
return vectorstore
import chatfuncs.chatfuncs as chatf
chatf.embeddings = load_embeddings(embeddings_name)
chatf.vectorstore =
get_faiss_store(faiss_vstore_folder="faiss_embedding",embeddings=globals()
["embeddings"])
hf_checkpoint = 'declare-lab/flan-alpaca-large'#'declare-lab/flan-alpaca-base' # # #
def create_hf_model(model_name):
with block:
ingest_text = gr.State()
ingest_metadata = gr.State()
ingest_docs = gr.State()
model_type_state = gr.State(model_type)
embeddings_state = gr.State(globals()["embeddings"])
vectorstore_state = gr.State(globals()["vectorstore"])
chat_history_state = gr.State()
instruction_prompt_out = gr.State()
gr.Markdown("<h1><center>TextBook AI</center></h1>")
with gr.Row():
current_source = gr.Textbox(label="Current data source(s)", value="Lambeth_2030-
Our_Future_Our_Lambeth.pdf", scale = 10,visible=False)
current_model = gr.Textbox(label="Current model", value=model_type, scale =
3,visible=False)
with gr.Tab("Chatbot"):
with gr.Row():
#chat_height = 500
chatbot = gr.Chatbot(avatar_images=('user.gif', 'bot_icon.gif'),bubble_full_width
= False, scale = 1) # , height=chat_height
with gr.Accordion("Open this tab to see the source paragraphs used to generate
the answer", open = False):
sources = gr.HTML(value = "Source paragraphs with the most relevant text
will appear here", scale = 1) # , height=chat_height
with gr.Row():
message = gr.Textbox(
label="Enter your question here",
lines=1,
)
with gr.Row():
submit = gr.Button(value="Send message", variant="secondary", scale = 1)
# Load in a pdf
load_pdf_click = load_pdf.click(ing.parse_file, inputs=[in_pdf], outputs=[ingest_text,
current_source])\
.then(ing.text_to_docs, inputs=[ingest_text], outputs=[ingest_docs])\
.then(docs_to_faiss_save, inputs=[ingest_docs], outputs=[ingest_embed_out,
vectorstore_state])\
.then(chatf.hide_block)
file_uploaded_state= True
if file_uploaded_state:
# Click/enter to send message action
response_click = submit.click(chatf.create_full_prompt, inputs=[message,
chat_history_state, current_topic, vectorstore_state, embeddings_state, model_type_state,
out_passages], outputs=[chat_history_state, sources, instruction_prompt_out],
queue=False, api_name="retrieval").\
1. https://www.gradio.app/docs/chatbot
2. https://www.gradio.app/docs/interface
3. https://platform.openai.com/docs/api-reference
4. https://github.com/dezuivere/edu-AI
5. https://www.youtube.com/watch?v=eE7CamOE-PA
6. https://docs.google.com/spreadsheets/d/
1VEUlfg0rc4wKS61QfdDmQoun_QG94hrrAM1il80IrG0/edit#gid=100338575