👍️[Update] Model : ブログレスの表示をmodel.binのダウンロードのみに変更/wisperのweightの表記に合わせてctanslate2のweightも小文字に変更
This commit is contained in:
@@ -70,7 +70,7 @@ def downloadWhisperWeight(root, weight_type, callback=None, end_callback=None):
|
||||
for filename in _FILENAMES:
|
||||
file_path = os_path.join(path, filename)
|
||||
url = huggingface_hub.hf_hub_url(_MODELS[weight_type], filename)
|
||||
downloadFile(url, file_path, func=callback)
|
||||
downloadFile(url, file_path, func=callback if filename == "model.bin" else None)
|
||||
if isinstance(end_callback, Callable):
|
||||
end_callback()
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import hashlib
|
||||
from utils import printLog
|
||||
|
||||
ctranslate2_weights = {
|
||||
"Small": { # M2M-100 418M-parameter model
|
||||
"small": { # M2M-100 418M-parameter model
|
||||
"url": "https://github.com/misyaguziya/VRCT-weights/releases/download/v1.0/m2m100_418m.zip",
|
||||
"directory_name": "m2m100_418m",
|
||||
"tokenizer": "facebook/m2m100_418M",
|
||||
@@ -18,7 +18,7 @@ ctranslate2_weights = {
|
||||
"shared_vocabulary.txt": "bd440aa21b8ca3453fc792a0018a1f3fe68b3464aadddd4d16a4b72f73c86d8c",
|
||||
}
|
||||
},
|
||||
"Large": { # M2M-100 1.2B-parameter model
|
||||
"large": { # M2M-100 1.2B-parameter model
|
||||
"url": "https://github.com/misyaguziya/VRCT-weights/releases/download/v1.0/m2m100_12b.zip",
|
||||
"directory_name": "m2m100_12b",
|
||||
"tokenizer": "facebook/m2m100_1.2b",
|
||||
@@ -39,7 +39,7 @@ def calculate_file_hash(file_path, block_size=65536):
|
||||
|
||||
return hash_object.hexdigest()
|
||||
|
||||
def checkCTranslate2Weight(root, weight_type="Small"):
|
||||
def checkCTranslate2Weight(root, weight_type="small"):
|
||||
weight_directory_name = ctranslate2_weights[weight_type]["directory_name"]
|
||||
hash_data = ctranslate2_weights[weight_type]["hash"]
|
||||
files = [
|
||||
@@ -61,7 +61,7 @@ def checkCTranslate2Weight(root, weight_type="Small"):
|
||||
already_downloaded = True
|
||||
return already_downloaded
|
||||
|
||||
def downloadCTranslate2Weight(root, weight_type="Small", callback=None, end_callback=None):
|
||||
def downloadCTranslate2Weight(root, weight_type="small", callback=None, end_callback=None):
|
||||
url = ctranslate2_weights[weight_type]["url"]
|
||||
filename = "weight.zip"
|
||||
path = os_path.join(root, "weights", "ctranslate2")
|
||||
|
||||
Reference in New Issue
Block a user