import os | |
import gradio as gr | |
# Access Hugging Face secret from the environment | |
hf_token = os.environ.get('pass') # 'pass' is the name of the secret you set | |
# Load the private Space using the secret | |
demo = gr.load("peymoon/test", hf_token=hf_token, src="spaces") | |
# Launch the public-facing interface | |
demo.launch() | |