GitHub Actions commited on
Commit
30f4f71
·
1 Parent(s): 33950ca

Deploy 0c7b740

Browse files
Files changed (1) hide show
  1. app/services/reranker.py +3 -3
app/services/reranker.py CHANGED
@@ -43,9 +43,9 @@ class Reranker:
43
  texts = [chunk.get("contextualised_text") or chunk["text"] for chunk in chunks]
44
 
45
  if self._remote:
46
- # Drop the timeout to 10.0s. If it takes longer (HF Space cold start),
47
- # fail fast so we can trigger the RRF fallback. Vercel times out at 15s.
48
- async with httpx.AsyncClient(timeout=10.0) as client:
49
  # Truncate individual texts to 1500 chars — cross-encoders truncate
50
  # anyway at their token limit (512 tokens ≈ ~1800 chars), so we lose
51
  # nothing while staying safely within the remote Space schema constraint.
 
43
  texts = [chunk.get("contextualised_text") or chunk["text"] for chunk in chunks]
44
 
45
  if self._remote:
46
+ # Reverted to 60.0s to allow HF Space cold starts. Timeout handling
47
+ # will be managed on the frontend.
48
+ async with httpx.AsyncClient(timeout=60.0) as client:
49
  # Truncate individual texts to 1500 chars — cross-encoders truncate
50
  # anyway at their token limit (512 tokens ≈ ~1800 chars), so we lose
51
  # nothing while staying safely within the remote Space schema constraint.