Spaces:
Sleeping
Sleeping
File size: 481 Bytes
15e12b1 befa452 15e12b1 befa452 15e12b1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
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
|