Spaces:
Runtime error
Runtime error
Commit
·
fd5587a
1
Parent(s):
9507b6c
Update history video
Browse files
app.py
CHANGED
|
@@ -276,6 +276,8 @@ def sadtalker_demo():
|
|
| 276 |
)
|
| 277 |
with gr.Tab("Lịch sử video"):
|
| 278 |
with gr.Row(elem_classes="gr-row"):
|
|
|
|
|
|
|
| 279 |
video_list = gr.Dropdown(
|
| 280 |
choices=list_videos(),
|
| 281 |
label="Chọn video để xem",
|
|
@@ -285,6 +287,8 @@ def sadtalker_demo():
|
|
| 285 |
video_player = gr.Video(
|
| 286 |
height=180, width=180, label="Video lịch sử", scale=1
|
| 287 |
)
|
|
|
|
|
|
|
| 288 |
video_list.change(lambda x: x, inputs=video_list, outputs=video_player)
|
| 289 |
with gr.Tab("Debug"):
|
| 290 |
directory_input = gr.Textbox(label="Enter Directory Path", value=".")
|
|
|
|
| 276 |
)
|
| 277 |
with gr.Tab("Lịch sử video"):
|
| 278 |
with gr.Row(elem_classes="gr-row"):
|
| 279 |
+
refresh_btn = gr.Button("🔄 Refresh File List")
|
| 280 |
+
|
| 281 |
video_list = gr.Dropdown(
|
| 282 |
choices=list_videos(),
|
| 283 |
label="Chọn video để xem",
|
|
|
|
| 287 |
video_player = gr.Video(
|
| 288 |
height=180, width=180, label="Video lịch sử", scale=1
|
| 289 |
)
|
| 290 |
+
|
| 291 |
+
refresh_btn.click(fn=lambda: gr.update(choices=list_videos()), outputs=video_list)
|
| 292 |
video_list.change(lambda x: x, inputs=video_list, outputs=video_player)
|
| 293 |
with gr.Tab("Debug"):
|
| 294 |
directory_input = gr.Textbox(label="Enter Directory Path", value=".")
|