Update hf_papers_tool.py
Browse files- hf_papers_tool.py +0 -9
hf_papers_tool.py
CHANGED
|
@@ -25,15 +25,6 @@ def _load_token() -> str | None:
|
|
| 25 |
except ImportError:
|
| 26 |
pass
|
| 27 |
|
| 28 |
-
token = os.getenv("HF_TOKEN")
|
| 29 |
-
if token:
|
| 30 |
-
return token
|
| 31 |
-
|
| 32 |
-
token_path = Path.home() / ".cache" / "huggingface" / "token"
|
| 33 |
-
if token_path.exists():
|
| 34 |
-
token_value = token_path.read_text(encoding="utf-8").strip()
|
| 35 |
-
return token_value or None
|
| 36 |
-
|
| 37 |
return None
|
| 38 |
|
| 39 |
|
|
|
|
| 25 |
except ImportError:
|
| 26 |
pass
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
return None
|
| 29 |
|
| 30 |
|