Sentiment Analysis

Adapted from Gradio Playground.

Code
import gradio as gr
from transformers_js_py import pipeline

pipe = await pipeline('sentiment-analysis')

demo = gr.Interface.from_pipeline(
    pipe,
    flagging_mode="never",
    live=True,
    examples=[
      ["๐ŸŸข Quarto + Gradio is a great match"],
      ["๐Ÿ”ด It would be a shame if this integration didn't work"],
    ],
)

demo.launch()
transformers-js-py import gradio as gr from transformers_js_py import pipeline pipe = await pipeline('sentiment-analysis') demo = gr.Interface.from_pipeline( pipe, flagging_mode="never", live=True, examples=[ ["๐ŸŸข Quarto + Gradio is a great match"], ["๐Ÿ”ด It would be a shame if this integration didn't work"], ], ) demo.launch()