awacke1 commited on
Commit
b8091cf
β€’
1 Parent(s): eae3954

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -33,10 +33,13 @@ def create_search_url_lyrics(artist_song):
33
  base_url = "https://www.google.com/search?q="
34
  return base_url + artist_song.replace(' ', '+').replace('–', '%E2%80%93').replace('&', 'and') + '+lyrics'
35
 
 
 
 
36
  def load_song_file(filename):
37
  with open(filename, "r") as file:
38
  chord_sheet = file.read()
39
- st.text_area(key="Enhanced Chord Sheet", chord_sheet, height=300, value=chord_sheet)
40
  processed_sheet = process_chord_sheet(chord_sheet)
41
  st.markdown(processed_sheet, unsafe_allow_html=True)
42
 
 
33
  base_url = "https://www.google.com/search?q="
34
  return base_url + artist_song.replace(' ', '+').replace('–', '%E2%80%93').replace('&', 'and') + '+lyrics'
35
 
36
+ def songupdate():
37
+ st.write(st.session_state.EnhancedChordSheet)
38
+
39
  def load_song_file(filename):
40
  with open(filename, "r") as file:
41
  chord_sheet = file.read()
42
+ st.text_area(label="Enhanced Chord Sheet", value=chord_sheet, chord_sheet, height=300, key="EnhancedChordSheet" help="This text can be read due to alternating chord lines and lyric lines.", label_visibility="visible", on_change=songupdate )
43
  processed_sheet = process_chord_sheet(chord_sheet)
44
  st.markdown(processed_sheet, unsafe_allow_html=True)
45