Spaces:
Runtime error
Runtime error
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() | |