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 lines8910111213147 unmodified linesraise ValueError("HF_TOKEN not found in environment variables.")repo_id = "Pujan-Dev/test"local_dir = "./Ai-Text-Detector2"repo = Repository(local_dir, clone_from=repo_id, token=hf_token)print(f"Repository downloaded to: {local_dir}")7 unmodified lines8910111213147 unmodified linesraise ValueError("HF_TOKEN not found in environment variables.")repo_id = "Pujan-Dev/test"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 lines50515249 unmodified lines### AuthenticationEnsure you set `HF_TOKEN` to access private repositories. If not set, the script will raise an error.49 unmodified lines50515253545556575859606149 unmodified lines### AuthenticationEnsure 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