Spaces:
Building
Building
prasanth.thangavel
commited on
Commit
·
2f0eefe
1
Parent(s):
97e5fa2
Show audio files in sorted order
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ def serve_audio(filename):
|
|
13 |
def home():
|
14 |
# Get list of audio files
|
15 |
audio_dir = os.path.join('static', 'audio')
|
16 |
-
audio_files = [f for f in os.listdir(audio_dir) if f.endswith(('.mp3', '.wav'))]
|
17 |
return render_template("index.html", audio_files=audio_files)
|
18 |
|
19 |
if __name__ == "__main__":
|
|
|
13 |
def home():
|
14 |
# Get list of audio files
|
15 |
audio_dir = os.path.join('static', 'audio')
|
16 |
+
audio_files = sorted([f for f in os.listdir(audio_dir) if f.endswith(('.mp3', '.wav'))])
|
17 |
return render_template("index.html", audio_files=audio_files)
|
18 |
|
19 |
if __name__ == "__main__":
|