Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import transformers
|
3 |
+
from transformers import pipeline
|
4 |
+
|
5 |
+
summarizer=pipeline("summarization")
|
6 |
+
|
7 |
+
def sumrz(text):
|
8 |
+
return summarizer(text,max_length=200,min_length=30)[0]['summary_text']
|
9 |
+
|
10 |
+
|
11 |
+
gr.Interface(fn=sumrz,inputs=gr.inputs.Textbox(lines=10,placeholder='Enter the text here.'),outputs='text').launch(inline=False)
|