Spaces:
Sleeping
Sleeping
Commit
·
21cce09
1
Parent(s):
ce6901f
UI changes
Browse files
app.py
CHANGED
|
@@ -117,8 +117,7 @@ def get_next_components():
|
|
| 117 |
|
| 118 |
(start_captions, start_video_id) = get_next_components()
|
| 119 |
|
| 120 |
-
with gr.Blocks(css=css, head=yt_init_js) as main_page:
|
| 121 |
-
gr.Markdown("## Caption Editor")
|
| 122 |
|
| 123 |
current_user = gr.Textbox(visible=False, interactive=False)
|
| 124 |
current_video_id = gr.Textbox(value=start_video_id, visible=False, interactive=False)
|
|
@@ -126,16 +125,18 @@ with gr.Blocks(css=css, head=yt_init_js) as main_page:
|
|
| 126 |
|
| 127 |
main_page.load(get_username, outputs=current_user) # Disabled when auth is disabled
|
| 128 |
|
| 129 |
-
with gr.Row():
|
| 130 |
-
with gr.Column(scale=
|
| 131 |
-
gr.
|
| 132 |
-
with gr.Column(scale=4
|
| 133 |
@gr.render(inputs=current_user)
|
| 134 |
def check_login(logged_in_user):
|
| 135 |
if logged_in_user is None:
|
| 136 |
-
gr.Markdown("
|
| 137 |
else:
|
| 138 |
-
gr.Markdown(f"
|
|
|
|
|
|
|
| 139 |
|
| 140 |
with gr.Row():
|
| 141 |
with gr.Column(scale=2, min_width=600):
|
|
|
|
| 117 |
|
| 118 |
(start_captions, start_video_id) = get_next_components()
|
| 119 |
|
| 120 |
+
with gr.Blocks(css=css, head=yt_init_js, fill_width=True) as main_page:
|
|
|
|
| 121 |
|
| 122 |
current_user = gr.Textbox(visible=False, interactive=False)
|
| 123 |
current_video_id = gr.Textbox(value=start_video_id, visible=False, interactive=False)
|
|
|
|
| 125 |
|
| 126 |
main_page.load(get_username, outputs=current_user) # Disabled when auth is disabled
|
| 127 |
|
| 128 |
+
with gr.Row(variant="panel"):
|
| 129 |
+
with gr.Column(scale=4):
|
| 130 |
+
gr.Markdown("## Caption Editor")
|
| 131 |
+
with gr.Column(scale=4):
|
| 132 |
@gr.render(inputs=current_user)
|
| 133 |
def check_login(logged_in_user):
|
| 134 |
if logged_in_user is None:
|
| 135 |
+
gr.Markdown("Please log in via Hugging Face", rtl=True)
|
| 136 |
else:
|
| 137 |
+
gr.Markdown(f"Logged in as {user}", rtl=True)
|
| 138 |
+
with gr.Column(scale=1, min_width=50):
|
| 139 |
+
gr.LoginButton(value="Log in", logout_value="Log in")
|
| 140 |
|
| 141 |
with gr.Row():
|
| 142 |
with gr.Column(scale=2, min_width=600):
|