Spaces:
Runtime error
Runtime error
Download app.py from AIStockAdvisor/AI-Stock-Advisor: direct link, hf CLI and curl.
- Browser
- Download file 481 Bytes
-
https://huggingface.co/spaces/AIStockAdvisor/AI-Stock-Advisor/resolve/main/app.py
- Command line
-
hf download hf://spaces/AIStockAdvisor/AI-Stock-Advisor/app.py
-
curl -L -o app.py https://huggingface.co/spaces/AIStockAdvisor/AI-Stock-Advisor/resolve/main/app.py
481 Bytes
| 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() | |