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