File size: 409 Bytes
3289359 29f9d08 fef7f78 29f9d08 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import gradio as gr
from transformers import pipeline
sentiment = pipeline("sentiment-analysis")
def sent(input_text):
return sentiment(input_text)
iface = gr.Interface(fn = sent,
inputs = 'text' ,
outputs = ['text'],
title = 'sentiment analysis',
description = 'this is taking the sentiment of a sentence')
iface.launch() |