Subhraj07's picture
Readme aligned
2142e0a
metadata
title: Text Summarization Api
emoji: 💻
colorFrom: gray
colorTo: blue
sdk: docker
pinned: false
license: openrail

How to use

import requests

headers = {
    'accept': 'application/json',
}

params = {
    'text': """
    Indian history is a long and complex tapestry that spans over several millennia. It is one of the most fascinating and diverse histories in the world, with a rich cultural heritage, a complex political landscape, and a long and complex social and economic history. From ancient civilizations and empires to the modern-day democratic republic, India has seen many ups and downs throughout its history.

    The earliest civilization in India is the Indus Valley Civilization, which dates back to around 2500 BCE. This civilization is known for its advanced urban planning, sophisticated drainage systems, and its remarkable use of writing systems. The Indus Valley Civilization was also a hub of trade and commerce, and its people were skilled craftsmen who produced high-quality goods.

    In the centuries that followed, India witnessed the rise and fall of several empires and dynasties. The Mauryan Empire, founded by Chandragupta Maurya in 322 BCE, was one of the most powerful empires in the ancient world. The empire was known for its centralized government, its sophisticated administration, and its vast army. The Mauryan Empire was also responsible for spreading Buddhism throughout India and beyond.

    In the centuries that followed, India saw the rise and fall of several other empires and dynasties, including the Gupta Empire, the Chola Empire, and the Mughal Empire. The Mughal Empire, founded by Babur in 1526, was one of the most powerful empires in the world at its peak. The Mughal Empire was known for its sophisticated administration, its art and architecture, and its vast wealth.

    However, by the 18th century, the Mughal Empire had begun to decline, and India became a battleground for European powers, who were competing for control over the country. The British East India Company eventually emerged as the dominant power in India, and by the mid-19th century, the British had established control over most of India.

    The British rule in India was marked by both progress and oppression. On the one hand, the British introduced modern technologies, such as railways and telegraphs, and modern institutions, such as universities and courts. On the other hand, the British also exploited India's resources and people, and India suffered from famines, poverty, and inequality.

    The struggle for independence from British rule began in earnest in the early 20th century, and in 1947, India finally gained its independence. However, the partition of India into India and Pakistan led to one of the largest migrations in human history and led to violence and bloodshed on both sides of the border.

    Since independence, India has made remarkable progress in many areas, including education, healthcare, and technology. India is now the world's largest democracy, with a vibrant and diverse society and a growing economy. However, India still faces many challenges, including poverty, corruption, and inequality, and the country's history is a reminder of the challenges and opportunities that lie ahead.

    In conclusion, Indian history is a rich and complex tapestry that spans over several millennia. From ancient civilizations and empires to the modern-day democratic republic, India has witnessed many ups and downs throughout its history. While India has made remarkable progress in many areas since gaining independence, the country still faces many challenges, and its history is a reminder of the challenges and opportunities that lie ahead.
""",
}

response = requests.get('https://subhraj07-text-summarization-api.hf.space/generate', params=params, headers=headers)

print(response.json())