area444 commited on
Commit
f686977
·
verified ·
1 Parent(s): be6c483

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -148,11 +148,11 @@ def save_csv(file_name):
148
  with gr.Blocks() as demo:
149
  # Create the first panel (visible from the start)
150
  with gr.Column(visible=True) as panel_1:
151
- user_text = gr.Textbox(label="User name:", placeholder="Type here...", max_lines=1)
152
- input_text = gr.Textbox(label="Password:", placeholder="Type here...", max_lines=1, type="password")
153
 
154
  # First button, visible from the start
155
- btn_1 = gr.Button("Login")
156
 
157
 
158
  with gr.Column(visible=False) as panel_2:
@@ -161,7 +161,7 @@ with gr.Blocks() as demo:
161
  # demo.load(update_message, None, gr.Markdown())
162
  # logout_button = gr.Button("Logout", link="/logout", scale=0)
163
  # Add a second button inside Panel 2 to hide the panel and show Panel 1 again
164
- btn_2 = gr.Button("Logout", visible=True)
165
  btn_2.click(hide_and_show_panel, outputs=[panel_2, panel_1]) # Hide Panel 2 and show Panel 1
166
  with gr.Row():
167
  start_input = gr.Textbox(label="Start Date:", placeholder="Enter date (e.g., 2023-09-01)", max_lines=1)
 
148
  with gr.Blocks() as demo:
149
  # Create the first panel (visible from the start)
150
  with gr.Column(visible=True) as panel_1:
151
+ user_text = gr.Textbox(label="User name:", placeholder="Type here...", max_lines=1, scale=0)
152
+ input_text = gr.Textbox(label="Password:", placeholder="Type here...", max_lines=1, scale=0, type="password")
153
 
154
  # First button, visible from the start
155
+ btn_1 = gr.Button("Login", scale=0)
156
 
157
 
158
  with gr.Column(visible=False) as panel_2:
 
161
  # demo.load(update_message, None, gr.Markdown())
162
  # logout_button = gr.Button("Logout", link="/logout", scale=0)
163
  # Add a second button inside Panel 2 to hide the panel and show Panel 1 again
164
+ btn_2 = gr.Button("Logout", visible=True, scale=0)
165
  btn_2.click(hide_and_show_panel, outputs=[panel_2, panel_1]) # Hide Panel 2 and show Panel 1
166
  with gr.Row():
167
  start_input = gr.Textbox(label="Start Date:", placeholder="Enter date (e.g., 2023-09-01)", max_lines=1)