awacke1 commited on
Commit
d86b226
β€’
1 Parent(s): 3c25bca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -7
app.py CHANGED
@@ -35,10 +35,6 @@ def load_song_file2(filename):
35
  st.session_state['chord_sheet'] = chord_sheet
36
  processed_sheet = process_chord_sheet(chord_sheet)
37
  st.markdown(processed_sheet, unsafe_allow_html=True)
38
- #def load_song_file(filename):
39
- # with open(filename, "r") as file:
40
- # chord_sheet = file.read()
41
- # return chord_sheet
42
  def load_song_file(file_path):
43
  with open(file_path, 'r', encoding='utf-8') as file:
44
  chord_sheet = file.read()
@@ -63,8 +59,6 @@ def auto_save():
63
  file.write(chord_sheet_text)
64
  st.session_state['char_count'] = len(chord_sheet)
65
  st.success(f"Auto-saved to {filename}")
66
-
67
-
68
  def main():
69
  col1, col3 = st.columns([3, 5])
70
  with col1:
@@ -119,7 +113,6 @@ def main():
119
  st.error("Both Song Name and Artist Name are required.")
120
  char_count_msg = f"Character Count: {st.session_state.get('char_count', 0)}"
121
  st.write(char_count_msg)
122
-
123
  # Load chord sheet from selected file into the text area
124
  if 'selected_file' in st.session_state and st.session_state.selected_file:
125
  load_song_file(st.session_state.selected_file)
 
35
  st.session_state['chord_sheet'] = chord_sheet
36
  processed_sheet = process_chord_sheet(chord_sheet)
37
  st.markdown(processed_sheet, unsafe_allow_html=True)
 
 
 
 
38
  def load_song_file(file_path):
39
  with open(file_path, 'r', encoding='utf-8') as file:
40
  chord_sheet = file.read()
 
59
  file.write(chord_sheet_text)
60
  st.session_state['char_count'] = len(chord_sheet)
61
  st.success(f"Auto-saved to {filename}")
 
 
62
  def main():
63
  col1, col3 = st.columns([3, 5])
64
  with col1:
 
113
  st.error("Both Song Name and Artist Name are required.")
114
  char_count_msg = f"Character Count: {st.session_state.get('char_count', 0)}"
115
  st.write(char_count_msg)
 
116
  # Load chord sheet from selected file into the text area
117
  if 'selected_file' in st.session_state and st.session_state.selected_file:
118
  load_song_file(st.session_state.selected_file)