File size: 392 Bytes
d90c395 a1dc744 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import gradio as gr
import pandas as pd
import numpy as np
from transformers import pipeline
def analyze(poem):
classifier = pipeline("text-classification", model="j-hartmann/emotion-english-distilroberta-base", return_all_scores=True)
return classifier(poem)
gr.Interface(
fn=analyze,
inputs= 'text',
outputs="text",
allow_flagging=False,).launch(); |