helloworld / app.py
LuisLeonard's picture
Update app.py
961bf62 verified
raw
history blame contribute delete
301 Bytes
import gradio as gr
from transformers import pipeline
classifier = pipeline("sentiment-analysis", model="finiteautomata/bertweet-base-sentiment-analysis")
def analyze_sentiment(text):
return classifier(text)
demo = gr.Interface(fn=analyze_sentiment, inputs="text", outputs="json")
demo.launch()