nagasurendra commited on
Commit
5b237a8
·
verified ·
1 Parent(s): 7d32dc9

Update components/login_signup.py

Browse files
Files changed (1) hide show
  1. components/login_signup.py +0 -4
components/login_signup.py CHANGED
@@ -2,7 +2,6 @@ import gradio as gr
2
  from utils.database_handler import check_credentials, save_user
3
 
4
  def login_page():
5
- # Login Button Actions
6
  def authenticate_user(email, password):
7
  if check_credentials(email, password):
8
  return gr.update(visible=False), gr.update(visible=True), "Welcome to Biryani Hub!"
@@ -22,7 +21,6 @@ def login_page():
22
  return gr.update(visible=True), gr.update(visible=False)
23
 
24
  with gr.Blocks() as login_interface:
25
- # Login Section
26
  with gr.Column(visible=True) as login_section:
27
  gr.Markdown("# Login to Biryani Hub")
28
  email = gr.Textbox(label="Email", placeholder="Enter your email")
@@ -32,7 +30,6 @@ def login_page():
32
  login_btn = gr.Button("Login")
33
  create_account_btn = gr.Button("Create an Account")
34
 
35
- # Sign-Up Section
36
  with gr.Column(visible=False) as signup_section:
37
  gr.Markdown("# Create Your Account")
38
  name = gr.Textbox(label="Name", placeholder="Enter your full name")
@@ -44,7 +41,6 @@ def login_page():
44
  submit_btn = gr.Button("Sign Up")
45
  back_to_login_btn = gr.Button("Back to Login")
46
 
47
- # Button Actions
48
  login_btn.click(
49
  authenticate_user,
50
  inputs=[email, password],
 
2
  from utils.database_handler import check_credentials, save_user
3
 
4
  def login_page():
 
5
  def authenticate_user(email, password):
6
  if check_credentials(email, password):
7
  return gr.update(visible=False), gr.update(visible=True), "Welcome to Biryani Hub!"
 
21
  return gr.update(visible=True), gr.update(visible=False)
22
 
23
  with gr.Blocks() as login_interface:
 
24
  with gr.Column(visible=True) as login_section:
25
  gr.Markdown("# Login to Biryani Hub")
26
  email = gr.Textbox(label="Email", placeholder="Enter your email")
 
30
  login_btn = gr.Button("Login")
31
  create_account_btn = gr.Button("Create an Account")
32
 
 
33
  with gr.Column(visible=False) as signup_section:
34
  gr.Markdown("# Create Your Account")
35
  name = gr.Textbox(label="Name", placeholder="Enter your full name")
 
41
  submit_btn = gr.Button("Sign Up")
42
  back_to_login_btn = gr.Button("Back to Login")
43
 
 
44
  login_btn.click(
45
  authenticate_user,
46
  inputs=[email, password],