File size: 235 Bytes
c3fdb2a
8c5e1a4
 
 
 
 
c3fdb2a
8c5e1a4
 
c3fdb2a
1
2
3
4
5
6
7
8
9
10
import gradio as gr
from transformers import pipeline
    
def sentiment(name):
    out = pipe(text)
    return out

pipe = pipeline("sentiment-analysis")
iface = gr.Interface(fn=sentiment, inputs="text", outputs="text")
iface.launch()