0% found this document useful (0 votes)
34 views4 pages

Soln

Artificial Intelligence (AI) is revolutionizing education through adaptive learning, intelligent tutoring systems, and administrative automation, enhancing personalized learning experiences. While AI offers significant benefits such as improved accessibility and efficiency, challenges like data privacy and algorithmic bias must be addressed. The future of education will focus on augmenting human educators' capabilities rather than replacing them, fostering a more engaging and inclusive learning environment.

Uploaded by

Shamanth M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views4 pages

Soln

Artificial Intelligence (AI) is revolutionizing education through adaptive learning, intelligent tutoring systems, and administrative automation, enhancing personalized learning experiences. While AI offers significant benefits such as improved accessibility and efficiency, challenges like data privacy and algorithmic bias must be addressed. The future of education will focus on augmenting human educators' capabilities rather than replacing them, fostering a more engaging and inclusive learning environment.

Uploaded by

Shamanth M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

PG7: Summarize long texts using a pre-trained summarization model using Hugging

face model. Load the summarization pipeline. Take a passage as input and obtain the
summarized text.

Soln:

from transformers import pipeline

# Load the summarization pipeline

summarizer = pipeline("summarization")

# Expanded input passage

text = """

Artificial Intelligence (AI) is transforming education by introducing adaptive learning


techniques, automating administrative processes, and enabling intelligent tutoring systems.
AI-driven learning platforms analyze vast amounts of student data, including learning habits,
strengths, and weaknesses, to personalize educational experiences. This customization
allows students to progress at their own pace, ensuring that they receive content suited to
their proficiency level. Additionally, AI chatbots and virtual assistants are becoming common
in academic institutions, providing real-time support to students. These tools answer
frequently asked questions, guide students through complex topics, and help with scheduling
and reminders. Educators also benefit from AI-powered grading systems that assess
assignments, quizzes, and exams, significantly reducing workload and providing instant
feedback. Moreover, AI enhances accessibility in education by offering language translation
services, speech-to-text conversion, and assistive technologies for students with disabilities.
By breaking language barriers and supporting diverse learning needs, AI makes education
more inclusive. However, challenges remain in implementing AI in education. Data privacy
concerns arise as student information is collected and analyzed, requiring robust security
measures. There is also the risk of AI biases, where algorithmic decisions may favor certain
groups over others due to biased training data. Additionally, educators must undergo proper
training to integrate AI effectively into their teaching methods. To fully harness AI’s
potential in education, institutions must adopt ethical AI frameworks, ensure transparency in
algorithmic decision-making, and continuously update their technological infrastructure.
Collaboration between educators, policymakers, and AI developers is crucial in shaping the
future of education and ensuring that AI serves as an enabler rather than a disruptor."""

# Generate the summary with longer output

summary = summarizer(long_text, max_length=100, min_length=50, do_sample=False)

# Print the summarized text

print("Summarized Text:\n", summary[0]['summary_text'])


Output:
Summarized Text:
Artificial Intelligence (AI) is transforming education by introducing
adaptive learning techniques, automating administrative processes, and
enabling intelligent tutoring systems . AI chatbots and virtual assistants
are becoming common in academic institutions, providing real-time support
to students . Data privacy concerns arise as student information is
collected and analyzed, requiring robust security measures .

from langchain_huggingface import HuggingFaceEndpoint

# get a token: https://huggingface.co/docs/api-inference/quicktour#get-your-api-token

from getpass import getpass

HUGGINGFACEHUB_API_TOKEN = getpass()

import os

os.environ["HUGGINGFACEHUB_API_TOKEN"] = HUGGINGFACEHUB_API_TOKEN

text = f"""Artificial Intelligence (AI) has emerged as a cornerstone of innovation in


education, fundamentally reshaping how knowledge is delivered, personalized, and assessed.
As institutions increasingly integrate AI into their pedagogical frameworks, the impact
extends beyond automation to the creation of intelligent learning environments that foster
engagement, accessibility, and efficiency.

One of the most profound contributions of AI to education is adaptive learning, a paradigm


that leverages data-driven insights to customize educational content for individual students.
Unlike traditional one-size-fits-all approaches, AI-powered platforms analyze student
performance, learning patterns, and cognitive preferences to adjust the difficulty level, pace,
and mode of instruction in real-time. This ensures that students who struggle with certain
concepts receive targeted reinforcement, while advanced learners can progress without
unnecessary repetition.

Intelligent tutoring systems (ITS) represent another significant advancement, providing


students with personalized, AI-driven guidance outside of traditional classroom settings.
These systems, built on natural language processing and machine learning, simulate human
tutors by offering step-by-step explanations, identifying gaps in understanding, and adapting
instructional methods accordingly. AI tutors are particularly valuable in disciplines such as
mathematics, science, and language learning, where real-time feedback and iterative
problem-solving are crucial to mastery.

Beyond individualized learning, AI enhances collaborative education by fostering interactive,


technology-driven experiences. Virtual reality (VR) and augmented reality (AR) applications,
powered by AI algorithms, create immersive simulations that enable students to explore
historical events, conduct virtual science experiments, and engage in role-based learning.
These innovations bridge the gap between theoretical knowledge and practical application,
making complex concepts more tangible and accessible.
AI also plays a critical role in automating administrative functions, thereby allowing
educators to allocate more time to teaching and mentorship. Automated grading systems can
evaluate assignments, quizzes, and even subjective responses with increasing accuracy, while
AI-driven scheduling tools streamline academic operations. Additionally, AI chatbots and
virtual assistants handle routine queries from students, reducing response times and
improving administrative efficiency.

One of the most significant yet underexplored benefits of AI in education is its potential to
enhance accessibility and inclusivity. Speech-to-text and text-to-speech technologies enable
students with disabilities to engage with learning materials more effectively. AI-driven
translation services remove language barriers, allowing students from diverse linguistic
backgrounds to access high-quality educational content. Moreover, AI-powered predictive
analytics can identify students at risk of falling behind, enabling early interventions to
prevent academic disengagement.

Despite these advantages, AI's integration into education is not without challenges. Ethical
concerns surrounding data privacy, bias in AI algorithms, and the digital divide must be
addressed to ensure equitable access to AI-driven education. Institutions must adopt
transparent AI governance policies, emphasizing accountability and inclusivity in algorithmic
decision-making. Additionally, educators must be equipped with the necessary training to
effectively implement AI tools within their instructional practices, ensuring that technology
serves as an enabler rather than a disruptor.

As AI continues to evolve, its role in education will extend beyond content delivery to
fostering critical thinking, creativity, and problem-solving skills. The future of education lies
not in replacing human educators but in augmenting their capabilities, enabling a more
engaging, efficient, and personalized learning experience for students worldwide. By striking
a balance between technological innovation and ethical responsibility, AI has the potential to
democratize education and bridge learning gaps on a global scale.

"""

import requests

API_URL = "https://api-inference.huggingface.co/models/facebook/bart-large-cnn"

headers = {"Authorization": "Bearer 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"}

def query(payload):

response = requests.post(API_URL, headers=headers, json=payload)

return response.json()

output = query({"inputs": text}) # Remove the curly braces


output
[{'summary_text': 'Artificial Intelligence (AI) has emerged as a
cornerstone of innovation in education. As institutions increasingly
integrate AI into their pedagogical frameworks, the impact extends beyond
automation to the creation of intelligent learning environments. The future
of education lies not in replacing human educators but in augmenting their
capabilities, enabling a more engaging, efficient, and personalized
learning experience.'}]

output[0]['summary_text']
'Artificial Intelligence (AI) has emerged as a cornerstone of innovation in
education. As institutions increasingly integrate AI into their pedagogical
frameworks, the impact extends beyond automation to the creation of
intelligent learning environments. The future of education lies not in
replacing human educators but in augmenting their capabilities, enabling a
more engaging, efficient, and personalized learning experience.'

You might also like