update model config
Browse files- server/model.py +1 -1
server/model.py
CHANGED
@@ -15,7 +15,7 @@ class SugoiTranslator:
|
|
15 |
self.sp_source_model = os.path.join(modelDir, "spm.ja.nopretok.model")
|
16 |
self.sp_target_model = os.path.join(modelDir, "spm.en.nopretok.model")
|
17 |
# inter_threads: quantas operações independentes podem ser executadas simultaneamente
|
18 |
-
self.translator = ctranslate2.Translator(modelDir, device="cpu", intra_threads=4, inter_threads=
|
19 |
|
20 |
def tokenizeBatch(self, text):
|
21 |
sp = spm.SentencePieceProcessor(self.sp_source_model)
|
|
|
15 |
self.sp_source_model = os.path.join(modelDir, "spm.ja.nopretok.model")
|
16 |
self.sp_target_model = os.path.join(modelDir, "spm.en.nopretok.model")
|
17 |
# inter_threads: quantas operações independentes podem ser executadas simultaneamente
|
18 |
+
self.translator = ctranslate2.Translator(modelDir, device="cpu", intra_threads=4, inter_threads=2)
|
19 |
|
20 |
def tokenizeBatch(self, text):
|
21 |
sp = spm.SentencePieceProcessor(self.sp_source_model)
|