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 files- HuggingFace/main.py +1 -1
- HuggingFace/readme.md +9 -0
HuggingFace/main.py
CHANGED
|
@@ -8,7 +8,7 @@ def download_repo():
|
|
| 8 |
raise ValueError("HF_TOKEN not found in environment variables.")
|
| 9 |
|
| 10 |
repo_id = "Pujan-Dev/test"
|
| 11 |
-
local_dir = "./Ai-Text-
|
| 12 |
|
| 13 |
repo = Repository(local_dir, clone_from=repo_id, token=hf_token)
|
| 14 |
print(f"Repository downloaded to: {local_dir}")
|
|
|
|
| 8 |
raise ValueError("HF_TOKEN not found in environment variables.")
|
| 9 |
|
| 10 |
repo_id = "Pujan-Dev/test"
|
| 11 |
+
local_dir = "../Ai-Text-Detector/"
|
| 12 |
|
| 13 |
repo = Repository(local_dir, clone_from=repo_id, token=hf_token)
|
| 14 |
print(f"Repository downloaded to: {local_dir}")
|
HuggingFace/readme.md
CHANGED
|
@@ -50,3 +50,12 @@ python main.py
|
|
| 50 |
### Authentication
|
| 51 |
|
| 52 |
Ensure you set `HF_TOKEN` to access private repositories. If not set, the script will raise an error.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
### Authentication
|
| 51 |
|
| 52 |
Ensure you set `HF_TOKEN` to access private repositories. If not set, the script will raise an error.
|
| 53 |
+
Here’s a clearer and more polished version of that note:
|
| 54 |
+
|
| 55 |
+
---
|
| 56 |
+
|
| 57 |
+
### ⚠️ Note
|
| 58 |
+
|
| 59 |
+
**Make sure to run this script from the `HuggingFace` directory to ensure correct path resolution and functionality.**
|
| 60 |
+
|
| 61 |
+
---
|