import gradio as gr | |
import os | |
def check_password(username, password): | |
if password == os.environ["ACCESS"]: | |
return True | |
else: | |
return False | |
read_key = os.environ.get("HF_TOKEN", None) | |
if __name__ == "__main__": | |
with gr.Blocks() as demo: | |
gr.load("Nauryzbay/deckify_private", hf_token=read_key, src="spaces") | |
demo.queue(max_size=10) | |
demo.launch(auth=check_password) |