Spaces:
Runtime error
Runtime error
Create download_weights.py
Browse files- download_weights.py +6 -0
download_weights.py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import subprocess, os, pathlib
|
| 2 |
+
weights_dir = pathlib.Path("weights") / "DotsOCR"
|
| 3 |
+
weights_dir.mkdir(parents=True, exist_ok=True)
|
| 4 |
+
# Use the repo’s helper to pull the model (supports HF or ModelScope)
|
| 5 |
+
subprocess.check_call(["python3", "tools/download_model.py"])
|
| 6 |
+
print("Weights downloaded into:", weights_dir)
|