Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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:
|
97 |
-
height:
|
98 |
-
margin-right:
|
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']
|
134 |
-
|
|
|
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 |
|