File size: 232 Bytes
1961c08
08831e4
1961c08
08831e4
 
 
 
 
 
1961c08
 
1
2
3
4
5
6
7
8
9
10
11
12
import gradio as gr
from transformers_js_py import pipeline

pipe = pipeline('sentiment-analysis')

async def process(text):
    return await pipe(text)

demo = gr.Interface(fn=process, inputs="text", outputs="json")

demo.launch()