fix: strip whitespace from HF_TOKEN
Browse files- Remove trailing newline/whitespace from token
- Fixes "Illegal header value" error
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
app.py
CHANGED
|
@@ -15,7 +15,7 @@ from huggingface_hub import login
|
|
| 15 |
# Hugging Face 토큰으로 로그인 (Spaces Secret에서 가져옴)
|
| 16 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
| 17 |
if HF_TOKEN:
|
| 18 |
-
login(token=HF_TOKEN)
|
| 19 |
|
| 20 |
# OCR 모델 ID
|
| 21 |
OCR_MODEL_ID = "Qwen/Qwen2.5-VL-7B-Instruct"
|
|
|
|
| 15 |
# Hugging Face 토큰으로 로그인 (Spaces Secret에서 가져옴)
|
| 16 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
| 17 |
if HF_TOKEN:
|
| 18 |
+
login(token=HF_TOKEN.strip())
|
| 19 |
|
| 20 |
# OCR 모델 ID
|
| 21 |
OCR_MODEL_ID = "Qwen/Qwen2.5-VL-7B-Instruct"
|