Spaces:
Sleeping
Sleeping
Pujan Neupane commited on
Commit ·
b42863e
1
Parent(s): 7788510
refactor: optmized the downloading of model script from hugging face for testing purpose
Browse filesFiles changed (2)
7 unmodified lines891011111213147 unmodified lines raise ValueError("HF_TOKEN not found in environment variables.")
repo_id = "Pujan-Dev/test" local_dir = "./Ai-Text-Detector2" local_dir = "../Ai-Text-Detector/"
repo = Repository(local_dir, clone_from=repo_id, token=hf_token) print(f"Repository downloaded to: {local_dir}")49 unmodified lines50515253545556575859606149 unmodified lines### Authentication
Ensure you set `HF_TOKEN` to access private repositories. If not set, the script will raise an error.Here’s a clearer and more polished version of that note:
---
### ⚠️ Note
**Make sure to run this script from the `HuggingFace` directory to ensure correct path resolution and functionality.**
---HuggingFace/main.py+1-1
HuggingFace/readme.md+9