Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,15 +1,14 @@
|
|
| 1 |
import os
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
|
| 6 |
|
| 7 |
-
|
|
|
|
|
|
|
| 8 |
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
)
|
| 13 |
|
| 14 |
-
if __name__ == "__main__":
|
| 15 |
-
demo.launch()
|
|
|
|
| 1 |
import os
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
+
# Get your Hugging Face API token from Space secrets
|
| 5 |
+
hf_token = os.environ.get('HF_TOKEN') # Or another secret name you set
|
| 6 |
|
| 7 |
+
# Load the Gradio Blocks from the private Space
|
| 8 |
+
# Replace "your-username-or-org" and "your-private-space-name" with your details
|
| 9 |
+
iface = gr.load(name="AIStockAdvisor/StockAdvisorCL", hf_token=hf_token, src='spaces')
|
| 10 |
|
| 11 |
+
# Optional: Disable the API endpoint of the loaded interface
|
| 12 |
+
# iface.queue(api_open=False).launch(show_api=False) # Or you might just call launch() directly
|
| 13 |
+
iface.launch()
|
|
|
|
| 14 |
|
|
|
|
|
|