Spaces:
Runtime error
Runtime error
Mr-Vicky-01
commited on
Commit
•
28c54e8
1
Parent(s):
76ae1d9
Update app.py
Browse files
app.py
CHANGED
@@ -11,12 +11,9 @@ def generate_summary(text):
|
|
11 |
summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
|
12 |
return summary
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
# ["A room without books is like a body without a soul."],
|
18 |
-
# ["The Sun is approximately 4.6 billion years older than Earth."],
|
19 |
-
# ]
|
20 |
|
21 |
-
demo = gr.Interface(fn=language_translator, inputs='text',outputs='text',title='Text Summarization'
|
22 |
demo.launch(debug=True,share=True)
|
|
|
11 |
summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
|
12 |
return summary
|
13 |
|
14 |
+
examples = [
|
15 |
+
["The rise of artificial intelligence (AI) has revolutionized various industries, including healthcare, finance, and transportation. AI technologies such as machine learning and natural language processing have enabled computers to perform tasks that were once thought to be exclusive to humans. In healthcare, AI is being used to diagnose diseases, personalize treatment plans, and predict patient outcomes. In finance, AI algorithms analyze market trends, manage portfolios, and detect fraudulent activities. Additionally, AI-powered autonomous vehicles are poised to transform transportation by enhancing safety and efficiency on the roads. Overall, the widespread adoption of AI is reshaping the way we live and work, with profound implications for society in the coming years."],
|
16 |
+
]
|
|
|
|
|
|
|
17 |
|
18 |
+
demo = gr.Interface(fn=language_translator, inputs='text',outputs='text',title='Text Summarization', examples=examples)
|
19 |
demo.launch(debug=True,share=True)
|