mobenta commited on
Commit
edc99b2
·
verified ·
1 Parent(s): fcb42a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -114,19 +114,19 @@ 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
  with gr.Row():
118
- with gr.Column(scale=1, min_width=400): # Adjust scale and min_width for the search column
 
 
 
 
119
  search_query_input = gr.Textbox(label="Search YouTube",
120
  placeholder="Enter your search query here",
121
  elem_id="search_query_input")
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=1, min_width=400):
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):
132
  search_results = youtube_search(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
+ # Arrange "Selected Video" and "Play Video" above the search bar
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
+ play_video_button = gr.Button("Play Video")
122
+
123
+ with gr.Column(scale=1, min_width=400):
124
  search_query_input = gr.Textbox(label="Search YouTube",
125
  placeholder="Enter your search query here",
126
  elem_id="search_query_input")
127
  search_button = gr.Button("Search")
128
  search_output = gr.Gallery(label="Search Results", columns=1, height="800px", elem_id="search_output")
129
 
 
 
 
 
 
130
  # Update the search results and store video IDs
131
  def update_search_results(query):
132
  search_results = youtube_search(query)