Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1746,7 +1746,10 @@ def change_choices_fix():
|
|
1746 |
'aiff', 'webm', 'ac3')):
|
1747 |
audio_paths.append(os.path.join('./audios',filename).replace('\\', '/'))
|
1748 |
print(audio_paths)
|
1749 |
-
|
|
|
|
|
|
|
1750 |
|
1751 |
|
1752 |
def custom_voice(
|
|
|
1746 |
'aiff', 'webm', 'ac3')):
|
1747 |
audio_paths.append(os.path.join('./audios',filename).replace('\\', '/'))
|
1748 |
print(audio_paths)
|
1749 |
+
most_recent_audio = ""
|
1750 |
+
if audio_paths:
|
1751 |
+
most_recent_audio = max(audio_paths, key=os.path.getctime)
|
1752 |
+
return {"choices": sorted(audio_paths), "value": most_recent_audio, "__type__": "update"}
|
1753 |
|
1754 |
|
1755 |
def custom_voice(
|