mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-02-02 15:12:51 +01:00
download tokenizer when present
This commit is contained in:
parent
7c3d1b43c1
commit
ec3de0495c
@ -107,9 +107,10 @@ def get_download_links_from_huggingface(model, branch):
|
|||||||
|
|
||||||
is_pytorch = re.match("pytorch_model.*\.bin", fname)
|
is_pytorch = re.match("pytorch_model.*\.bin", fname)
|
||||||
is_safetensors = re.match("model.*\.safetensors", fname)
|
is_safetensors = re.match("model.*\.safetensors", fname)
|
||||||
|
is_tokenizer = re.match("tokenizer.*\.model", fname)
|
||||||
is_text = re.match(".*\.(txt|json)", fname)
|
is_text = re.match(".*\.(txt|json)", fname)
|
||||||
|
|
||||||
if is_text or is_safetensors or is_pytorch:
|
if any((is_pytorch, is_safetensors, is_text, is_tokenizer)):
|
||||||
if is_text:
|
if is_text:
|
||||||
links.append(f"https://huggingface.co/{model}/resolve/{branch}/{fname}")
|
links.append(f"https://huggingface.co/{model}/resolve/{branch}/{fname}")
|
||||||
classifications.append('text')
|
classifications.append('text')
|
||||||
|
Loading…
Reference in New Issue
Block a user