tommulder commited on
Commit
399c4d1
·
1 Parent(s): 1cd3063

fix(hf): add hf_transfer for HF_HUB_ENABLE_HF_TRANSFER; remove deprecated symlink arg; add root / route

Browse files
pyproject.toml CHANGED
@@ -23,6 +23,7 @@ dependencies = [
23
  "qwen-vl-utils",
24
  "requests>=2.31.0",
25
  "httpx>=0.27.0",
 
26
  ]
27
 
28
  [project.optional-dependencies]
 
23
  "qwen-vl-utils",
24
  "requests>=2.31.0",
25
  "httpx>=0.27.0",
26
+ "hf_transfer>=0.1.6",
27
  ]
28
 
29
  [project.optional-dependencies]
requirements.txt CHANGED
@@ -13,3 +13,4 @@ accelerate>=0.20.0
13
  qwen-vl-utils
14
  requests>=2.31.0
15
  httpx>=0.27.0
 
 
13
  qwen-vl-utils
14
  requests>=2.31.0
15
  httpx>=0.27.0
16
+ hf_transfer>=0.1.6
src/kybtech_dots_ocr/app.py CHANGED
@@ -80,6 +80,12 @@ app = FastAPI(
80
  )
81
 
82
 
 
 
 
 
 
 
83
  @app.get("/health")
84
  async def health_check():
85
  """Health check endpoint."""
 
80
  )
81
 
82
 
83
+ @app.get("/")
84
+ async def root():
85
+ """Root route for uptime checks."""
86
+ return {"status": "ok", "service": "kybtech-dots-ocr", "version": "1.0.0"}
87
+
88
+
89
  @app.get("/health")
90
  async def health_check():
91
  """Health check endpoint."""
src/kybtech_dots_ocr/model_loader.py CHANGED
@@ -83,7 +83,6 @@ class DotsOCRModelLoader:
83
  local_path = snapshot_download(
84
  repo_id=REPO_ID,
85
  local_dir=LOCAL_DIR,
86
- local_dir_use_symlinks=False, # Avoid symlink issues in containers
87
  )
88
 
89
  logger.info(f"Model downloaded successfully to {local_path}")
 
83
  local_path = snapshot_download(
84
  repo_id=REPO_ID,
85
  local_dir=LOCAL_DIR,
 
86
  )
87
 
88
  logger.info(f"Model downloaded successfully to {local_path}")