mobenta commited on
Commit
02f3c4c
·
verified ·
1 Parent(s): 2bb6477

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -177,7 +177,18 @@ with gr.Blocks() as demo:
177
  if error_message:
178
  return [], error_message, gr.update(visible=True)
179
  # Display videos with thumbnails, video IDs, and titles
180
- gallery_items_display = [(item[0], f"{item[2]} ({item[1]})") for item in gallery_items]
 
 
 
 
 
 
 
 
 
 
 
181
  return gallery_items_display, "", gr.update(visible=False)
182
 
183
  # Update the selected video link field when a video is clicked in the gallery
 
177
  if error_message:
178
  return [], error_message, gr.update(visible=True)
179
  # Display videos with thumbnails, video IDs, and titles
180
+ gallery_items_display = [
181
+ (
182
+ item[0],
183
+ f"<div style='display: flex; align-items: center;'>
184
+ <img src='{item[0]}' style='width: 150px; height: auto; margin-right: 10px;'>
185
+ <div style='flex-grow: 1;'>
186
+ <strong>{item[2]}</strong><br>
187
+ Video ID: {item[1]}
188
+ </div>
189
+ </div>"
190
+ ) for item in gallery_items
191
+ ]
192
  return gallery_items_display, "", gr.update(visible=False)
193
 
194
  # Update the selected video link field when a video is clicked in the gallery