@@ -370,7 +370,7 @@ def create_ui(theme_name="Ocean"):
370
370
llm_provider = gr .Dropdown (
371
371
["anthropic" , "openai" , "deepseek" , "gemini" , "ollama" , "azure_openai" ],
372
372
label = "LLM Provider" ,
373
- value = "openai " ,
373
+ value = "" ,
374
374
info = "Select your preferred language model provider"
375
375
)
376
376
llm_model_name = gr .Dropdown (
@@ -495,8 +495,20 @@ def create_ui(theme_name="Ocean"):
495
495
def list_recordings (save_recording_path ):
496
496
if not os .path .exists (save_recording_path ):
497
497
return []
498
+
499
+ # Get all video files
498
500
recordings = glob .glob (os .path .join (save_recording_path , "*.[mM][pP]4" )) + glob .glob (os .path .join (save_recording_path , "*.[wW][eE][bB][mM]" ))
499
- return recordings
501
+
502
+ # Sort recordings by creation time (oldest first)
503
+ recordings .sort (key = os .path .getctime )
504
+
505
+ # Add numbering to the recordings
506
+ numbered_recordings = []
507
+ for idx , recording in enumerate (recordings , start = 1 ):
508
+ filename = os .path .basename (recording )
509
+ numbered_recordings .append ((recording , f"{ idx } . { filename } " ))
510
+
511
+ return numbered_recordings
500
512
501
513
recordings_gallery = gr .Gallery (
502
514
label = "Recordings" ,
@@ -548,4 +560,4 @@ def main():
548
560
demo .launch (server_name = args .ip , server_port = args .port )
549
561
550
562
if __name__ == '__main__' :
551
- main ()
563
+ main ()
0 commit comments