Severian commited on
Commit
654310e
·
verified ·
1 Parent(s): 263d5f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -421,9 +421,9 @@ def get_dropdown_choices(info_dict):
421
 
422
  def login(username, password):
423
  if username == USERNAME and password == PASSWORD:
424
- return gr.update(visible=True), gr.update(visible=False), gr.update(visible=False), gr.update(value="Login successful! You can now access the Caption Captain tab.", visible=True, value="ugd")
425
  else:
426
- return gr.update(visible=False), gr.update(visible=True), gr.update(visible=True), gr.update(value="Invalid username or password. Please try again.", visible=True, value="ugd!")
427
 
428
  # Gradio interface
429
  with gr.Blocks(theme="Hev832/Applio", css=css, fill_width=True, fill_height=True) as demo:
@@ -462,9 +462,9 @@ with gr.Blocks(theme="Hev832/Applio", css=css, fill_width=True, fill_height=True
462
  )
463
 
464
  with gr.Row():
465
- username = gr.Textbox(label="Username", placeholder="Enter your username")
466
  with gr.Row():
467
- password = gr.Textbox(label="Password", type="password", placeholder="Enter your password")
468
  with gr.Row():
469
  login_button = gr.Button("Login", size="sm")
470
  login_message = gr.Markdown(visible=False)
 
421
 
422
  def login(username, password):
423
  if username == USERNAME and password == PASSWORD:
424
+ return gr.update(visible=True), gr.update(visible=False), gr.update(visible=False), gr.update(value="Login successful! You can now access the Caption Captain tab.", visible=True)
425
  else:
426
+ return gr.update(visible=False), gr.update(visible=True), gr.update(visible=True), gr.update(value="Invalid username or password. Please try again.", visible=True)
427
 
428
  # Gradio interface
429
  with gr.Blocks(theme="Hev832/Applio", css=css, fill_width=True, fill_height=True) as demo:
 
462
  )
463
 
464
  with gr.Row():
465
+ username = gr.Textbox(label="Username", placeholder="Enter your username", value="ugd")
466
  with gr.Row():
467
+ password = gr.Textbox(label="Password", type="password", placeholder="Enter your password", value="ugd!")
468
  with gr.Row():
469
  login_button = gr.Button("Login", size="sm")
470
  login_message = gr.Markdown(visible=False)