mobenta commited on
Commit
03c6b25
·
verified ·
1 Parent(s): ba3b1fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -200,11 +200,10 @@ with gr.Blocks(css="""
200
  index = evt.index
201
  selected_video_id = video_ids[index]
202
  selected_video_type = video_types[index]
203
- video_url = f"https://www.youtube.com/watch?v={selected_video_id}" if selected_video_type == "video" else ""
204
- return video_url, selected_video_type
205
 
206
  def play_video(video_id, video_type):
207
- return show_video(video_id, video_type)
208
 
209
  search_button.click(
210
  update_search_results,
 
200
  index = evt.index
201
  selected_video_id = video_ids[index]
202
  selected_video_type = video_types[index]
203
+ return f"https://www.youtube.com/watch?v={selected_video_id}", selected_video_type
 
204
 
205
  def play_video(video_id, video_type):
206
+ return show_video(video_id.split("=")[-1], video_type)
207
 
208
  search_button.click(
209
  update_search_results,