File size: 263 Bytes
6392931
 
 
5781d16
 
 
 
6392931
6d3e43e
 
1
2
3
4
5
6
7
8
9
10
import gradio as gr
from transformers import pipeline

pipe = pipeline("sentiment-analysis")

def analyze(input):
    return pipe(input)
    
interface = gr.Interface(fn=analyze, inputs="text", outputs="text", title="Simple Sentiment Analysis")
interface.launch()