Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ model_name = "Heng666/madlad400-3b-mt-ct2-int8"
|
|
21 |
model_path = snapshot_download(model_name)
|
22 |
|
23 |
tokenizer = SentencePieceProcessor()
|
24 |
-
tokenizer.load(f"{model_path}/
|
25 |
translator = ctranslate2.Translator(model_path)
|
26 |
tokens = [tokenizer.decode(i) for i in range(460)]
|
27 |
lang_codes = [token[2:-1] for token in tokens if token.startswith("<2")]
|
|
|
21 |
model_path = snapshot_download(model_name)
|
22 |
|
23 |
tokenizer = SentencePieceProcessor()
|
24 |
+
tokenizer.load(f"{model_path}/spiece.model")
|
25 |
translator = ctranslate2.Translator(model_path)
|
26 |
tokens = [tokenizer.decode(i) for i in range(460)]
|
27 |
lang_codes = [token[2:-1] for token in tokens if token.startswith("<2")]
|