Spaces:
Sleeping
Sleeping
from transformers import pipeline | |
import gradio as gr | |
sentimentAnalyzer = pipeline("sentiment-analysis") | |
def predict_sentiment(text): | |
return sentimentAnalyzer(text)[0]['label'] | |
iface = gr.Interface(fn=predict_sentiment,inputs=["text"],outputs=["text"]) | |
iface.launch(share=True) |