import os import gradio as gr # Get your Hugging Face API token from Space secrets hf_token = os.environ.get('HF_TOKEN') # Load the Gradio Blocks from the private Space iface = gr.load(name="AIStockAdvisor/StockAdvisorCL", token=hf_token, src='spaces') #if __name__ == "__main__": # iface.launch() # Optional: Disable the API endpoint of the loaded interface iface.queue(api_open=False).launch(show_api=False) # Or you might just call launch() directly # iface.launch()