Spaces:
Sleeping
Sleeping
import gradio as gr | |
import os | |
def get_accepted_username_passwords(): | |
username__passwords = [os.environ.get(f'USER_{i}', None) for i in range(900) if os.environ.get(f'USER_{i}', False)] | |
return username__passwords | |
def auth_verification(username, password): | |
username__password = f'{username}__{password}' | |
username__passwords_accepted = get_accepted_username_passwords() | |
allowed = username__password in username__passwords_accepted | |
return allowed | |