File size: 630 Bytes
6dba858
88055ae
 
6dba858
f301aac
88055ae
cb68822
88055ae
2ecd65e
88055ae
7766c93
6dba858
cb68822
6b072bf
 
9de2735
 
 
6b072bf
4854d0b
6b072bf
 
68de716
88055ae
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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)