CoolFace
Apppublic

DoruC/Grounded-Segment-Anything

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
__init__.py58 linesDownload Raw Back to code_llama
1# Copyright 2023 MetaAI and The HuggingFace Inc. team. All rights reserved.2#3# Licensed under the Apache License, Version 2.0 (the "License");4# you may not use this file except in compliance with the License.5# You may obtain a copy of the License at6#7#     http://www.apache.org/licenses/LICENSE-2.08#9# Unless required by applicable law or agreed to in writing, software10# distributed under the License is distributed on an "AS IS" BASIS,11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12# See the License for the specific language governing permissions and13# limitations under the License.14from typing import TYPE_CHECKING15 16from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available, is_tokenizers_available17 18 19_import_structure = {}20 21try:22    if not is_sentencepiece_available():23        raise OptionalDependencyNotAvailable()24except OptionalDependencyNotAvailable:25    pass26else:27    _import_structure["tokenization_code_llama"] = ["CodeLlamaTokenizer"]28 29try:30    if not is_tokenizers_available():31        raise OptionalDependencyNotAvailable()32except OptionalDependencyNotAvailable:33    pass34else:35    _import_structure["tokenization_code_llama_fast"] = ["CodeLlamaTokenizerFast"]36 37if TYPE_CHECKING:38    try:39        if not is_sentencepiece_available():40            raise OptionalDependencyNotAvailable()41    except OptionalDependencyNotAvailable:42        pass43    else:44        from .tokenization_code_llama import CodeLlamaTokenizer45 46    try:47        if not is_tokenizers_available():48            raise OptionalDependencyNotAvailable()49    except OptionalDependencyNotAvailable:50        pass51    else:52        from .tokenization_code_llama_fast import CodeLlamaTokenizerFast53 54else:55    import sys56 57    sys.modules[__name__] = _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)58