Spaces:
Sleeping
Sleeping
nam pham
commited on
Commit
·
36e09ce
1
Parent(s):
3c77fc1
feat: fix max sequence length
Browse files- app/server.py +1 -0
app/server.py
CHANGED
@@ -17,6 +17,7 @@ class EmbeddingModelAPI(ls.LitAPI):
|
|
17 |
model_kwargs={"file_name": "onnx/model.onnx"},
|
18 |
trust_remote_code=True,
|
19 |
)
|
|
|
20 |
self.similarity_model = SentenceTransformer(
|
21 |
os.path.join(DATA_PATH, SIMILARITY_MODEL_NAME),
|
22 |
backend="onnx",
|
|
|
17 |
model_kwargs={"file_name": "onnx/model.onnx"},
|
18 |
trust_remote_code=True,
|
19 |
)
|
20 |
+
self.retrieval_model.max_seq_length = 2048
|
21 |
self.similarity_model = SentenceTransformer(
|
22 |
os.path.join(DATA_PATH, SIMILARITY_MODEL_NAME),
|
23 |
backend="onnx",
|