emotions / app.py
Lord-Raven
Trying pipeline.
bb22eb8
raw
history blame
286 Bytes
import gradio as gr
from transformers import pipeline
classifier = pipeline("text-classification", model="SamLowe/roberta-base-go_emotions")
def predict(text):
return classifier(text)
demo = gr.Interface(
fn=predict,
inputs='text',
outputs='result',
)
demo.launch()