Ozziey's picture
Update app.py
a1dc744
raw
history blame contribute delete
392 Bytes
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();