Spaces:
Sleeping
Sleeping
| 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(ARTICLE, max_length=65, min_length=30, do_sample=False) | |
| demo = gr.Interface(fn=process, inputs="text", outputs="json") | |
| demo.launch() |