Spaces:
Sleeping
Sleeping
File size: 338 Bytes
aaa284f c4992d8 aaa284f 573bfdb aaa284f c4992d8 852da30 e278f34 c4992d8 aaa284f |
1 2 3 4 5 6 7 8 9 10 11 12 |
import gradio as gr
from transformers import pipeline
pipe = pipeline(task="sentiment-analysis", model="amaldevc/nlp_sentiment")
def predict(review):
pred = pipe.predict(review)
return pred
#return pred["label"] + " with score " + pred["score"]
iface = gr.Interface(fn=predict, inputs="text", outputs="text")
iface.launch() |