Spaces:
Sleeping
Sleeping
Download debug_env.py from PROSTLE/StockSense-AI: direct link, hf CLI and curl.
- Browser
- Download file 785 Bytes
-
https://huggingface.co/spaces/PROSTLE/StockSense-AI/resolve/main/debug_env.py
- Command line
-
hf download hf://spaces/PROSTLE/StockSense-AI/debug_env.py
-
curl -L -o debug_env.py https://huggingface.co/spaces/PROSTLE/StockSense-AI/resolve/main/debug_env.py
785 Bytes
| import os | |
| import sys | |
| import json | |
| # Add backend to path | |
| _BACKEND = os.path.join(os.getcwd(), "backend") | |
| if _BACKEND not in sys.path: | |
| sys.path.insert(0, _BACKEND) | |
| print("--- OpenEnv Debug ---") | |
| print(f"API_BASE_URL: {os.getenv('API_BASE_URL')}") | |
| print(f"API_KEY: {'[PRESENT]' if os.getenv('API_KEY') else '[MISSING]'}") | |
| print(f"HF_TOKEN: {'[PRESENT]' if os.getenv('HF_TOKEN') else '[MISSING]'}") | |
| print(f"MODEL_NAME: {os.getenv('MODEL_NAME')}") | |
| try: | |
| from llm_proxy import get_llm_client | |
| client = get_llm_client() | |
| print(f"LLM Mode: {client.mode}") | |
| if client.mode == "proxy": | |
| print(f"Proxy URL: {client.api_base_url}") | |
| print(f"Model: {client.model_name}") | |
| except Exception as e: | |
| print(f"Error initializing proxy: {e}") | |
| print("--- End Debug ---") | |