Update app.py
Browse files
app.py
CHANGED
@@ -78,7 +78,7 @@ def auto_save():
|
|
78 |
def main():
|
79 |
st.markdown('### 🎵 ChordSheet - Music Playing and Authoring App')
|
80 |
|
81 |
-
col1,
|
82 |
|
83 |
with col1:
|
84 |
with st.expander("Select Song:", expanded=True):
|
@@ -102,7 +102,6 @@ def main():
|
|
102 |
else:
|
103 |
st.error("Both Song Name and Artist Name are required.")
|
104 |
|
105 |
-
with col2:
|
106 |
|
107 |
st.header("🎼 Available Songs")
|
108 |
for file in all_files:
|
@@ -121,6 +120,17 @@ def main():
|
|
121 |
"""
|
122 |
st.markdown(table_md)
|
123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
with col3:
|
125 |
chord_sheet_area = st.text_area("Chord Sheet", value=st.session_state.get('chord_sheet', ''), height=1200, key='chord_sheet', on_change=auto_save)
|
126 |
char_count_msg = f"Character Count: {st.session_state.get('char_count', 0)}"
|
|
|
78 |
def main():
|
79 |
st.markdown('### 🎵 ChordSheet - Music Playing and Authoring App')
|
80 |
|
81 |
+
col1, col3 = st.columns([3, 5])
|
82 |
|
83 |
with col1:
|
84 |
with st.expander("Select Song:", expanded=True):
|
|
|
102 |
else:
|
103 |
st.error("Both Song Name and Artist Name are required.")
|
104 |
|
|
|
105 |
|
106 |
st.header("🎼 Available Songs")
|
107 |
for file in all_files:
|
|
|
120 |
"""
|
121 |
st.markdown(table_md)
|
122 |
|
123 |
+
st.header("🎼 Current Song")
|
124 |
+
load_song_file(selected_file)
|
125 |
+
song_info = os.path.splitext(selected_file)[0].replace("_", " ")
|
126 |
+
st.markdown("**" + song_info + "**")
|
127 |
+
table_md = f"""
|
128 |
+
| Wikipedia | YouTube | Chords | Lyrics |
|
129 |
+
| --------- | ------- | ------ | ------ |
|
130 |
+
| [📚]({create_search_url_wikipedia(song_info)}) | [🎥]({create_search_url_youtube(song_info)}) | [🎸]({create_search_url_chords(song_info)}) | [🎶]({create_search_url_lyrics(song_info)}) |
|
131 |
+
"""
|
132 |
+
st.markdown(table_md)
|
133 |
+
|
134 |
with col3:
|
135 |
chord_sheet_area = st.text_area("Chord Sheet", value=st.session_state.get('chord_sheet', ''), height=1200, key='chord_sheet', on_change=auto_save)
|
136 |
char_count_msg = f"Character Count: {st.session_state.get('char_count', 0)}"
|