File size: 408 Bytes
1c46da7 21a45b0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
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() |