viswanani's picture
Create src/app.py
2e6f78c verified
raw
history blame contribute delete
262 Bytes
import gradio as gr
from transformers import pipeline
clf = pipeline("sentiment-analysis", model="./outputs")
def classify(text):
return clf(text)[0]['label']
gr.Interface(fn=classify, inputs="text", outputs="text", title="Sentiment Classifier").launch()