madankn79's picture
Initial Version
c7d5d4f
raw
history blame
295 Bytes
import gradio as gr
from transformers import pipeline
pipe = pipeline("summarization", model="facebook/bart-large-cnn")
async def process(text):
return pipe(text, max_length=65, min_length=30, do_sample=False)
demo = gr.Interface(fn=process, inputs="text", outputs="json")
demo.launch()