File size: 340 Bytes
4436b5b
fca2fe7
4436b5b
fca2fe7
 
 
 
4436b5b
 
 
1
2
3
4
5
6
7
8
9
10
11
import gradio as gr
from transformers import pipeline

summarizer = pipeline("summarization", model="facebook/bart-large-cnn")

def greet(article, max_length=130, min_length=30, do_sample=False):
    return summarizer(article, max_length, min_length, do_sample)

iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch()