Update login.py
Browse files
login.py
CHANGED
|
@@ -11,18 +11,6 @@ def login(username, password):
|
|
| 11 |
else:
|
| 12 |
return False, "Invalid username or password."
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
username_input = gr.Textbox(label="Username")
|
| 18 |
-
password_input = gr.Textbox(label="Password", type="password")
|
| 19 |
-
login_button = gr.Button("Login")
|
| 20 |
-
result = gr.Textbox(label="Result")
|
| 21 |
-
|
| 22 |
-
login_button.click(
|
| 23 |
-
login,
|
| 24 |
-
inputs=[username_input, password_input],
|
| 25 |
-
outputs=[result]
|
| 26 |
-
)
|
| 27 |
-
|
| 28 |
-
return login_interface
|
|
|
|
| 11 |
else:
|
| 12 |
return False, "Invalid username or password."
|
| 13 |
|
| 14 |
+
# protected_content.py
|
| 15 |
+
def protected_content():
|
| 16 |
+
return "Welcome to the protected content! This is only visible after successful login."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|