Skip to content

Commit

Permalink
update version.
Browse files Browse the repository at this point in the history
  • Loading branch information
shibing624 committed Nov 28, 2022
1 parent 3285ef4 commit 445ab03
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
loguru
jieba>=0.39
transformers
huggingface-hub
datasets
gensim>=4.0.0
text2vec
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='textgen',
version='0.1.6',
version='0.1.7',
description='Text Generation Model',
long_description=readme,
long_description_content_type='text/markdown',
Expand Down
4 changes: 2 additions & 2 deletions textgen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@description:
"""

__version__ = '0.1.6'
__version__ = '0.1.7'

from textgen.augment.text_augment import TextAugment

Expand All @@ -15,7 +15,7 @@
from textgen.language_modeling.language_modeling_model import LanguageModelingModel
from textgen.config.model_args import SongNetArgs
from textgen.language_modeling.songnet_model import SongNetModel
from textgen.language_modeling.songnet_utils import SongNetTokenizer
from textgen.language_modeling.songnet_utils import SongNetTokenizer, snapshot_download

from textgen.config.model_args import QuestionAnsweringArgs
from textgen.question_answering.question_answering_model import QuestionAnsweringModel
Expand Down
19 changes: 10 additions & 9 deletions textgen/language_modeling/songnet_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,15 +504,16 @@ def _extract_archive(file_path, path='.', archive_format='auto'):
from huggingface_hub import HfApi, hf_hub_url, cached_download
import fnmatch


def snapshot_download(
repo_id: str,
revision: Optional[str] = None,
cache_dir: Union[str, Path, None] = None,
library_name: Optional[str] = None,
library_version: Optional[str] = None,
user_agent: Union[Dict, str, None] = None,
ignore_files: Optional[List[str]] = None,
use_auth_token: Union[bool, str, None] = None
repo_id: str,
revision: Optional[str] = None,
cache_dir: Union[str, Path, None] = None,
library_name: Optional[str] = None,
library_version: Optional[str] = None,
user_agent: Union[Dict, str, None] = None,
ignore_files: Optional[List[str]] = None,
use_auth_token: Union[bool, str, None] = None
) -> str:
"""
Method derived from huggingface_hub.
Expand All @@ -532,7 +533,7 @@ def snapshot_download(

for model_file in model_info.siblings:
if ignore_files is not None:
skip_download = False
skip_download = False
for pattern in ignore_files:
if fnmatch.fnmatch(model_file.rfilename, pattern):
skip_download = True
Expand Down

0 comments on commit 445ab03

Please sign in to comment.