shawarmabytes's picture
Update app.py
4854d0b
raw
history blame
630 Bytes
import streamlit.components.v1 as components
from streamlit_player import st_player
from transformers import pipeline
import streamlit as st
import random
def tester(text):
classifier = pipeline("sentiment-analysis", model='bhadresh-savani/distilbert-base-uncased-emotion')
results = classifier(text)
st.subheader(results[0]['label'])
#tester(emo)
with st.form(key="form1"):
emo = st.text_input("Enter a text/phrase/sentence. A corresponding song will be recommended based on its emotion.", placeholder="tester po")
submit = st.form_submit_button("Generate Playlist!")
tester(emo)