import gradio as gr
from transformers_js_py import pipeline
pipe = await pipeline("sentiment-analysis")
async def process(text):
return await pipe(text)
demo = gr.Interface(
fn=process,
inputs=gr.Textbox(value="Change this text, then click 'Submit'"),
outputs="json",
flagging_mode="never",
)
demo.launch()