shawarmabytes commited on
Commit
6b072bf
·
1 Parent(s): bd6e20f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -5
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import streamlit.components.v1 as components
2
  from streamlit_player import st_player
3
  from transformers import pipeline
 
4
  import streamlit as st
5
  import random
6
 
@@ -40,17 +41,29 @@ def tester(text):
40
 
41
  st.header("stream your emotions")
42
 
 
 
43
 
44
- with st.form(key="form1"):
45
- emo = st.text_input("Enter a text/phrase/sentence. A corresponding song will be recommended based on its emotion.")
46
- submit = st.form_submit_button("Generate Playlist!")
 
 
 
47
 
48
  st.write("Examples: i love you so much")
49
  st.write("I am exhausted.")
50
  st.write("I feel energetic.")
51
  st.write("bro you scared me there")
52
 
53
- transfer = emo
54
- tester(transfer)
 
 
 
 
 
 
 
55
 
56
 
 
1
  import streamlit.components.v1 as components
2
  from streamlit_player import st_player
3
  from transformers import pipeline
4
+ from state import provide_state
5
  import streamlit as st
6
  import random
7
 
 
41
 
42
  st.header("stream your emotions")
43
 
44
+ def main(state):
45
+ state.inputs = state.inputs or set()
46
 
47
+ input_string = st.text_input("Give inputs")
48
+ state.inputs.add(input_string)
49
+
50
+ st.selectbox("Select Dynamic", options=list(state.inputs))
51
+
52
+ main()
53
 
54
  st.write("Examples: i love you so much")
55
  st.write("I am exhausted.")
56
  st.write("I feel energetic.")
57
  st.write("bro you scared me there")
58
 
59
+ tester(main())
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
 
69