Spaces:
Runtime error
Runtime error
from transformers import pipeline | |
def get_sentiment_analysis(text): | |
classifier = pipeline("sentiment-analysis") | |
return classifier(text) | |
# Gradio code | |
import gradio as gr | |
demo = gr.Interface(fn=get_sentiment_analysis, inputs="text", outputs="text") | |
demo.launch(share=True) |