Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -33,6 +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 main():
|
37 |
with st.sidebar:
|
38 |
st.title('🎵 Song Files')
|
@@ -70,28 +77,21 @@ def main():
|
|
70 |
st.markdown(f"[🎥YouTube]({create_search_url_youtube(song_info)})")
|
71 |
st.markdown(f"[🎸Chords]({create_search_url_chords(song_info)})")
|
72 |
st.markdown(f"[🎶Lyrics]({create_search_url_lyrics(song_info)})")
|
73 |
-
|
74 |
-
st.header("🎼 Available Songs")
|
75 |
-
for file in all_files:
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
def load_song_file(filename):
|
90 |
-
with open(filename, "r") as file:
|
91 |
-
chord_sheet = file.read()
|
92 |
-
st.text_area("Chord Sheet", chord_sheet, height=300)
|
93 |
-
processed_sheet = process_chord_sheet(chord_sheet)
|
94 |
-
st.markdown(processed_sheet, unsafe_allow_html=True)
|
95 |
|
96 |
if __name__ == '__main__':
|
97 |
main()
|
|
|
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("Chord Sheet", chord_sheet, height=300)
|
40 |
+
processed_sheet = process_chord_sheet(chord_sheet)
|
41 |
+
st.markdown(processed_sheet, unsafe_allow_html=True)
|
42 |
+
|
43 |
def main():
|
44 |
with st.sidebar:
|
45 |
st.title('🎵 Song Files')
|
|
|
77 |
st.markdown(f"[🎥YouTube]({create_search_url_youtube(song_info)})")
|
78 |
st.markdown(f"[🎸Chords]({create_search_url_chords(song_info)})")
|
79 |
st.markdown(f"[🎶Lyrics]({create_search_url_lyrics(song_info)})")
|
80 |
+
|
81 |
+
st.header("🎼 Available Songs")
|
82 |
+
for file in all_files:
|
83 |
+
song_info = os.path.splitext(file)[0].replace("_", " ")
|
84 |
+
col1, col2, col3, col4, col5 = st.columns([4, 1, 1, 1, 1])
|
85 |
+
with col1:
|
86 |
+
st.markdown(f"* {song_info}")
|
87 |
+
with col2:
|
88 |
+
st.markdown(f"[📚Wikipedia]({create_search_url_wikipedia(song_info)})")
|
89 |
+
with col3:
|
90 |
+
st.markdown(f"[🎥YouTube]({create_search_url_youtube(song_info)})")
|
91 |
+
with col4:
|
92 |
+
st.markdown(f"[🎸Chords]({create_search_url_chords(song_info)})")
|
93 |
+
with col5:
|
94 |
+
st.markdown(f"[🎶Lyrics]({create_search_url_lyrics(song_info)})")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
if __name__ == '__main__':
|
97 |
main()
|