SampleTest / app.py
ShankarC's picture
Update app.py
a05a280 verified
Raw History Blame Contribute Delete
538 Bytes
import os
import gradio as gr
# Get your Hugging Face API token from Space secrets
hf_token = os.environ.get('HF_TOKEN') # Or another secret name you set
# Load the Gradio Blocks from the private Space
# Replace "your-username-or-org" and "your-private-space-name" with your details
iface = gr.load(name="AIStockAdvisor/TestCL", hf_token=hf_token, src='spaces')
# 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()