Spaces:
Sleeping
Sleeping
Initial Version
Browse files
app.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from transformers_js_py import pipeline
|
3 |
+
|
4 |
+
pipe = await pipeline("summarization", model="facebook/bart-large-cnn")
|
5 |
+
|
6 |
+
async def process(text):
|
7 |
+
return await pipe(text)
|
8 |
+
|
9 |
+
demo = gr.Interface(fn=process, inputs="text", outputs="json")
|
10 |
+
|
11 |
+
demo.launch()
|