maryna7679 commited on
Commit
1a8ceff
·
1 Parent(s): b5c697d

Login requirements 4

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -114,7 +114,6 @@ def get_next_components():
114
 
115
  with gr.Blocks(css=css, head=yt_init_js) as main_page:
116
  gr.Markdown("## Caption Editor")
117
- gr.LoginButton()
118
 
119
  current_user = gr.Textbox(visible=False, interactive=False)
120
  current_video_id = gr.Textbox(value=start_video_id, visible=False, interactive=False)
@@ -126,11 +125,13 @@ with gr.Blocks(css=css, head=yt_init_js) as main_page:
126
  def render_page(logged_in_user):
127
  if logged_in_user is None:
128
  gr.Markdown("## Please log in via Hugging Face")
 
129
  else:
130
  with gr.Row():
131
  with gr.Column(scale=2, min_width=600):
132
  # Video player and "next video button
133
- video_embed = gr.HTML(value=get_youtube_player_html())
 
134
  next_video_button = gr.Button("Next")
135
  with gr.Column(scale=1, min_width=200):
136
  # Read-only DataFrame with add button
@@ -235,4 +236,6 @@ with gr.Blocks(css=css, head=yt_init_js) as main_page:
235
  }"""
236
  )
237
 
 
 
238
  main_page.launch(share=True)
 
114
 
115
  with gr.Blocks(css=css, head=yt_init_js) as main_page:
116
  gr.Markdown("## Caption Editor")
 
117
 
118
  current_user = gr.Textbox(visible=False, interactive=False)
119
  current_video_id = gr.Textbox(value=start_video_id, visible=False, interactive=False)
 
125
  def render_page(logged_in_user):
126
  if logged_in_user is None:
127
  gr.Markdown("## Please log in via Hugging Face")
128
+ gr.LoginButton()
129
  else:
130
  with gr.Row():
131
  with gr.Column(scale=2, min_width=600):
132
  # Video player and "next video button
133
+ # video_embed = gr.HTML(value=get_youtube_player_html())
134
+ gr.HTML(value=get_youtube_player_html())
135
  next_video_button = gr.Button("Next")
136
  with gr.Column(scale=1, min_width=200):
137
  # Read-only DataFrame with add button
 
236
  }"""
237
  )
238
 
239
+ gr.LoginButton()
240
+
241
  main_page.launch(share=True)