Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import transformers
|
3 |
+
from transformers import pipeline
|
4 |
+
|
5 |
+
summa= pipeline('summarization')
|
6 |
+
|
7 |
+
def Get_summarization(input_text):
|
8 |
+
text=summa(input_text)
|
9 |
+
result=text[0]['summary_text']
|
10 |
+
return result
|
11 |
+
iface= gr.Interface(fn=Get_summarization,
|
12 |
+
title='Text Summarization',
|
13 |
+
inputs='text',outputs='text',
|
14 |
+
description='summarization of text giving input').launch()
|