Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,6 +21,13 @@ def split_text(text, split_ratio=0.5):
|
|
21 |
split_point = int(len(lines) * split_ratio)
|
22 |
return '\n'.join(lines[:split_point]), '\n'.join(lines[split_point:])
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
def display_chord_sheet_in_two_page_view(chord_sheet):
|
25 |
# Splitting the text into two halves
|
26 |
first_half, second_half = split_text(chord_sheet)
|
|
|
21 |
split_point = int(len(lines) * split_ratio)
|
22 |
return '\n'.join(lines[:split_point]), '\n'.join(lines[split_point:])
|
23 |
|
24 |
+
def create_search_url(base_url, artist_song):
|
25 |
+
return base_url + artist_song.replace(' ', '+').replace('β', '%E2%80%93').replace('&', 'and')
|
26 |
+
|
27 |
+
def load_song_file(file_path):
|
28 |
+
with open(file_path, 'r', encoding='utf-8') as file:
|
29 |
+
return file.read()
|
30 |
+
|
31 |
def display_chord_sheet_in_two_page_view(chord_sheet):
|
32 |
# Splitting the text into two halves
|
33 |
first_half, second_half = split_text(chord_sheet)
|