mobenta commited on
Commit
0324f73
·
verified ·
1 Parent(s): db9d378

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -14
app.py CHANGED
@@ -114,26 +114,18 @@ with gr.Blocks(css="""
114
  gr.Markdown("## YouTube Video Search, Selection, and Playback")
115
  video_ids_state = gr.State() # To store video IDs corresponding to the search results
116
 
117
- # Row for Selected Video Link and Play Video Button
118
  with gr.Row():
119
- with gr.Column(scale=1, min_width=400):
120
- selected_video_link = gr.Textbox(label="Selected Video Link", interactive=False)
121
- with gr.Column(scale=1, min_width=400):
122
- play_video_button = gr.Button("Play Video")
123
-
124
- # Row for Search Bar and Search Button
125
- with gr.Row():
126
- with gr.Column(scale=1, min_width=400):
127
  search_query_input = gr.Textbox(label="Search YouTube",
128
  placeholder="Enter your search query here",
129
- elem_id="search_query_input")
130
  search_button = gr.Button("Search")
131
- with gr.Column(scale=1, min_width=400):
132
  search_output = gr.Gallery(label="Search Results", columns=1, height="800px", elem_id="search_output")
133
 
134
- # Add a row for the video output (below the search output)
135
- with gr.Row():
136
- video_output = gr.HTML(label="Video Player")
 
137
 
138
  # Update the search results and store video IDs
139
  def update_search_results(query):
 
114
  gr.Markdown("## YouTube Video Search, Selection, and Playback")
115
  video_ids_state = gr.State() # To store video IDs corresponding to the search results
116
 
 
117
  with gr.Row():
118
+ with gr.Column(scale=3):
 
 
 
 
 
 
 
119
  search_query_input = gr.Textbox(label="Search YouTube",
120
  placeholder="Enter your search query here",
121
+ elem_id="search_query_input") # Add elem_id to target in CSS
122
  search_button = gr.Button("Search")
 
123
  search_output = gr.Gallery(label="Search Results", columns=1, height="800px", elem_id="search_output")
124
 
125
+ with gr.Column(scale=2):
126
+ selected_video_link = gr.Textbox(label="Selected Video Link", interactive=False)
127
+ play_video_button = gr.Button("Play Video")
128
+ video_output = gr.HTML(label="Video Player")
129
 
130
  # Update the search results and store video IDs
131
  def update_search_results(query):