Spaces:
Sleeping
Sleeping
Create check_files.py
Browse files- check_files.py +13 -0
check_files.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from pathlib import Path
|
| 2 |
+
import json
|
| 3 |
+
|
| 4 |
+
LOCAL_MODEL_DIR = Path("models--MoritzLaurer--deberta-v3-large-zeroshot-v2.0/snapshots/cf44676c28ba7312e5c5f8f8d2c22b3e0c9cdae2")
|
| 5 |
+
|
| 6 |
+
for file in ["config.json", "tokenizer_config.json", "special_tokens_map.json", "added_tokens.json"]:
|
| 7 |
+
path = LOCAL_MODEL_DIR / file
|
| 8 |
+
if path.exists():
|
| 9 |
+
try:
|
| 10 |
+
json.load(open(path, encoding="utf-8"))
|
| 11 |
+
print(f"✅ OK: {file}")
|
| 12 |
+
except Exception as e:
|
| 13 |
+
print(f"❌ BAD: {file} -> {e}")
|