senti / app.py
smjain's picture
Update app.py
21a45b0
raw
history blame contribute delete
408 Bytes
from transformers import pipeline
import gradio as grad
roberta_pipe = pipeline(
"sentiment-analysis",
model="siebert/sentiment-roberta-large-english",
tokenizer="siebert/sentiment-roberta-large-english",
return_all_scores = True
)
def analyse_sentiment(text):
response = roberta_pipe(text)
return response
grad.Interface(fn=analyse_sentiment, inputs="text", outputs="text").launch()