Spaces:
Running
Running
Upload router_proxy.py
Browse files- router_proxy.py +1 -1
router_proxy.py
CHANGED
|
@@ -97,7 +97,7 @@ async def proxy_download(req_data: ProxyDownloadRequest, db: Session = Depends(g
|
|
| 97 |
|
| 98 |
# 🚀 核心修复:从环境变量提取 Hugging Face Token,并组装 Authorization 请求头
|
| 99 |
# 注意:这里的变量名需与你在 Spaces -> Settings -> Variables and secrets 中设置的名称一致
|
| 100 |
-
hf_token = os.environ.get("HF_TOKEN")
|
| 101 |
|
| 102 |
headers = {}
|
| 103 |
if hf_token and "huggingface.co" in target_url:
|
|
|
|
| 97 |
|
| 98 |
# 🚀 核心修复:从环境变量提取 Hugging Face Token,并组装 Authorization 请求头
|
| 99 |
# 注意:这里的变量名需与你在 Spaces -> Settings -> Variables and secrets 中设置的名称一致
|
| 100 |
+
hf_token = os.environ.get("HF_TOKEN")
|
| 101 |
|
| 102 |
headers = {}
|
| 103 |
if hf_token and "huggingface.co" in target_url:
|