Spaces:
Runtime error
Runtime error
GitHub Actions commited on
Commit ·
30f4f71
1
Parent(s): 33950ca
Deploy 0c7b740
Browse files- 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 |
-
#
|
| 47 |
-
#
|
| 48 |
-
async with httpx.AsyncClient(timeout=
|
| 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.
|