KroZenDev commited on
Commit
1887b4c
·
verified ·
1 Parent(s): 7257851

Update download_models.py

Browse files
Files changed (1) hide show
  1. download_models.py +15 -0
download_models.py CHANGED
@@ -20,4 +20,19 @@ for remote_path in FILES:
20
  hf_hub_download(repo_id=REPO_ID, filename=remote_path, local_dir=MODEL_DIR)
21
  print(f" Saved to {local_path}")
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  print("\nAll models ready!")
 
20
  hf_hub_download(repo_id=REPO_ID, filename=remote_path, local_dir=MODEL_DIR)
21
  print(f" Saved to {local_path}")
22
 
23
+ # Попробуем скачать cls модель
24
+ for repo, path in [
25
+ ("RapidAI/RapidOCR", "onnx/PP-OCRv4/cls/ch_ppocr_mobile_v2.0_cls_infer.onnx"),
26
+ ("RapidAI/RapidOCR", "onnx/PP-OCRv3/cls/ch_ppocr_mobile_v2.0_cls_infer.onnx"),
27
+ ]:
28
+ local = os.path.join(MODEL_DIR, path)
29
+ if os.path.exists(local):
30
+ continue
31
+ try:
32
+ hf_hub_download(repo_id=repo, filename=path, local_dir=MODEL_DIR)
33
+ print(f"Saved cls: {local}")
34
+ break
35
+ except Exception:
36
+ pass
37
+
38
  print("\nAll models ready!")