File size: 256 Bytes
aaa284f
c4992d8
aaa284f
573bfdb
aaa284f
c4992d8
 
 
 
aaa284f
1
2
3
4
5
6
7
8
9
10
import gradio as gr
from transformers import pipeline

pipe = pipeline(task="sentiment-analysis", model="amaldevc/nlp_sentiment")

def predict(review):
    pipe.predict(review)

iface = gr.Interface(fn=predict, inputs="text", outputs="text")
iface.launch()