madankn79's picture
Initial Version
73fdc8f
raw
history blame
265 Bytes
import gradio as gr
from transformers_js_py import pipeline
pipe = await pipeline("summarization", model="facebook/bart-large-cnn")
async def process(text):
return await pipe(text)
demo = gr.Interface(fn=process, inputs="text", outputs="json")
demo.launch()