Ozziey's picture
Update app.py
ac34c34
raw
history blame
447 Bytes
import gradio as gr
import pandas as pd
import numpy as np
!pip install transformers
import transformers
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();