Mr-Vicky-01 commited on
Commit
27b965c
1 Parent(s): 07ede97

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -11,7 +11,14 @@ def generate_summary(text):
11
  summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
12
  return summary
13
 
14
- examples = [["In the dynamic landscape of the 21st century, artificial intelligence (AI) has emerged as a cornerstone technology driving unprecedented innovation across diverse domains. From healthcare to agriculture, finance to manufacturing, AI's transformative impact is palpable. In healthcare, AI-driven diagnostic systems analyze complex medical data, empowering clinicians with insights for precise treatment planning and disease management. Moreover, AI-powered predictive analytics models forecast patient outcomes, optimizing resource allocation and enhancing healthcare delivery. In agriculture, AI-enabled drones and sensors monitor crop health, soil conditions, and weather patterns, revolutionizing farming practices for improved yield and sustainability. The financial sector harnesses AI algorithms for fraud detection, risk assessment, and algorithmic trading, enhancing market efficiency and mitigating financial risks. In manufacturing, AI-driven robotics and automation systems optimize production processes, increasing productivity and quality while reducing operational costs. Additionally, AI-powered virtual assistants and chatbots revolutionize customer service, providing personalized interactions and seamless support across digital platforms. As AI technologies evolve, ethical considerations surrounding data privacy, algorithmic bias, and job displacement come to the fore, necessitating robust governance frameworks and ethical guidelines. Nevertheless, the transformative potential of AI to drive innovation, enhance productivity, and improve human well-being remains unparalleled, heralding a future where intelligent systems augment human capabilities and redefine the possibilities of tomorrow."]]
 
 
 
 
 
 
 
15
 
16
  demo = gr.Interface(fn=generate_summary, inputs='text',outputs='text',title='Text Summarization', examples=examples)
17
  demo.launch(debug=True,share=True)
 
11
  summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
12
  return summary
13
 
14
+ examples = [
15
+ ["In the dynamic landscape of the 21st century, artificial intelligence (AI) has emerged as a cornerstone technology driving unprecedented innovation across diverse domains. From healthcare to agriculture, finance to manufacturing, AI's transformative impact is palpable. In healthcare, AI-driven diagnostic systems analyze complex medical data, empowering clinicians with insights for precise treatment planning and disease management. Moreover, AI-powered predictive analytics models forecast patient outcomes, optimizing resource allocation and enhancing healthcare delivery. In agriculture, AI-enabled drones and sensors monitor crop health, soil conditions, and weather patterns, revolutionizing farming practices for improved yield and sustainability. The financial sector harnesses AI algorithms for fraud detection, risk assessment, and algorithmic trading, enhancing market efficiency and mitigating financial risks. In manufacturing, AI-driven robotics and automation systems optimize production processes, increasing productivity and quality while reducing operational costs. Additionally, AI-powered virtual assistants and chatbots revolutionize customer service, providing personalized interactions and seamless support across digital platforms. As AI technologies evolve, ethical considerations surrounding data privacy, algorithmic bias, and job displacement come to the fore, necessitating robust governance frameworks and ethical guidelines. Nevertheless, the transformative potential of AI to drive innovation, enhance productivity, and improve human well-being remains unparalleled, heralding a future where intelligent systems augment human capabilities and redefine the possibilities of tomorrow."],
16
+ ["""The Industrial Revolution, often regarded as one of the most transformative periods in human history, commenced in Britain during the latter part of the 18th century and gradually spread across the globe. Its impact was profound and multifaceted, reshaping nearly every aspect of society, economy, and daily life. At its core was the rapid development and adoption of new technologies, such as steam power, mechanization, and the factory system. These innovations revolutionized traditional industries, enabling mass production on an unprecedented scale and significantly increasing efficiency and productivity. As a result, goods once crafted painstakingly by hand could now be manufactured swiftly and in large quantities, leading to an explosion in consumer markets and a surge in global trade. Concurrently, the revolution spurred urbanization as rural populations flocked to burgeoning industrial centers in search of employment opportunities, fundamentally altering the demographic landscape and giving rise to sprawling cities teeming with people and activity.
17
+
18
+ However, the Industrial Revolution was not without its drawbacks and challenges. While it brought about undeniable economic growth and prosperity for many, it also engendered profound social inequalities and labor exploitation. Factory workers, including men, women, and children, toiled for long hours in hazardous conditions for meager wages, often subjected to harsh treatment by factory owners and overseers. Moreover, the relentless pursuit of profit and industrial expansion exacted a heavy toll on the environment, as factories spewed pollutants into the air and waterways, and deforestation accelerated to meet the insatiable demand for timber and resources.
19
+
20
+ Despite these drawbacks, the Industrial Revolution fundamentally transformed the fabric of society and laid the groundwork for the modern world. It fueled technological innovation, spurred scientific inquiry, and catalyzed advancements in transportation, communication, and medicine. Moreover, it set the stage for the rise of capitalism and the development of modern economic systems, shaping the dynamics of global commerce and trade for centuries to come. Today, its legacy endures in the form of industrial infrastructure, urban landscapes, and societal norms, serving as a testament to humanity's capacity for innovation and adaptation in the face of profound change."""]
21
+ ]
22
 
23
  demo = gr.Interface(fn=generate_summary, inputs='text',outputs='text',title='Text Summarization', examples=examples)
24
  demo.launch(debug=True,share=True)