mobenta commited on
Commit
697a066
·
verified ·
1 Parent(s): f5acdad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -93,9 +93,9 @@ def show_video(video_url):
93
  # Create the Gradio interface
94
  with gr.Blocks(css="""
95
  #search_output img {
96
- width: 500px !important;
97
- height: auto !important;
98
- margin-right: 20px;
99
  }
100
  #search_output .gallery-item {
101
  display: flex !important;
@@ -106,7 +106,6 @@ with gr.Blocks(css="""
106
  text-align: left !important;
107
  padding-left: 20px;
108
  font-size: 24px !important;
109
- font-weight: bold !important;
110
  }
111
  """) as demo:
112
  gr.Markdown("## YouTube Video Search, Selection, and Playback")
@@ -130,8 +129,9 @@ with gr.Blocks(css="""
130
  video_ids = []
131
  for item in search_results:
132
  image_url = item['thumbnail_url']
133
- title = item['title'] # Only show the title as plain text
134
- gallery_items.append((image_url, title)) # Pass the title directly as plain text
 
135
  video_ids.append(item['video_id'])
136
  return gallery_items, video_ids
137
 
 
93
  # Create the Gradio interface
94
  with gr.Blocks(css="""
95
  #search_output img {
96
+ width: 150px !important;
97
+ height: 150px !important;
98
+ margin-right: 0px;
99
  }
100
  #search_output .gallery-item {
101
  display: flex !important;
 
106
  text-align: left !important;
107
  padding-left: 20px;
108
  font-size: 24px !important;
 
109
  }
110
  """) as demo:
111
  gr.Markdown("## YouTube Video Search, Selection, and Playback")
 
129
  video_ids = []
130
  for item in search_results:
131
  image_url = item['thumbnail_url']
132
+ title = item['title']
133
+ caption = f"{title}" # Display only the title as plain text
134
+ gallery_items.append((image_url, caption))
135
  video_ids.append(item['video_id'])
136
  return gallery_items, video_ids
137