Spaces:
Runtime error
Runtime error
File size: 285 Bytes
b33fae6 214013d 00a39fe 43324c4 378efab efb3a3f 378efab e03bf74 f25fd11 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
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()
|