Spaces:
Sleeping
Sleeping
Commit
·
ecade36
1
Parent(s):
b5a2509
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import pipeline
|
| 2 |
+
import gradio as gr
|
| 3 |
+
model = pipeline("summarization")
|
| 4 |
+
|
| 5 |
+
def get_input(text):
|
| 6 |
+
summary = model(text,max_length =100, min_length = 25,do_sample=False)
|
| 7 |
+
return summary
|
| 8 |
+
|
| 9 |
+
iface = gr.Interface(fn=get_input,inputs="text",outputs="text",title = "Text Summarizar",description="Enter your text to get summary")
|
| 10 |
+
iface.launch()
|