未验证 提交 c5935d8b 编写于 作者: J Jack Zhou 提交者: GitHub

fix windows url bug (#5137)

fix windows url bug
上级 c210e7ed
......@@ -16,7 +16,7 @@ from enum import Enum
import os.path as osp
URL_ROOT = "https://paddlenlp.bj.bcebos.com"
EMBEDDING_URL_ROOT = osp.join(URL_ROOT, "models/embeddings")
EMBEDDING_URL_ROOT = URL_ROOT + "/models/embeddings"
PAD_TOKEN = '[PAD]'
UNK_TOKEN = '[UNK]'
......
......@@ -69,7 +69,7 @@ class TokenEmbedding(nn.Embedding):
vector_path = osp.join(EMBEDDING_HOME, embedding_name + ".npz")
if not osp.exists(vector_path):
# download
url = osp.join(EMBEDDING_URL_ROOT, embedding_name + ".tar.gz")
url = EMBEDDING_URL_ROOT + "/" + embedding_name + ".tar.gz"
get_path_from_url(url, EMBEDDING_HOME)
logger.info("Loading token embedding...")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册