Test1 / app.py
MBJamshidi's picture
create app.py
5307642 verified
raw
history blame contribute delete
278 Bytes
import gradio as gr
from transformers import pipeline
classifier = pipeline("sentiment-analysis")
def predict(text):
return classifier(text)[0]["label"]
demo = gr.Interface(
fn=predict,
inputs="text",
outputs="text",
title="Sentiment App"
)
demo.launch()