test123 / login.py
mrgalindo's picture
Update login.py
52b25c3 verified
raw
history blame contribute delete
495 Bytes
import gradio as gr
# Hardcoded username and password for demonstration
# In a real application, use a more secure method
USERNAME = "user"
PASSWORD = "password"
def login(username, password):
if username == USERNAME and password == PASSWORD:
return True, "Login successful!"
else:
return False, "Invalid username or password."
# protected_content.py
def protected_content():
return "Welcome to the protected content! This is only visible after successful login."