sentiment / app.py
ananthujay's picture
Update app.py
43324c4
raw
history blame contribute delete
285 Bytes
import gradio as gr
from transformers import pipeline
nlp = pipeline("sentiment-analysis")
def scoring(text):
results = nlp(text)
sentiment = results[0]['label']
return sentiment
iface = gr.Interface(fn=scoring, inputs="text", outputs="text")
iface.launch()