Spaces:
Running
Running
File size: 410 Bytes
5425d5d 9c8ace5 5425d5d 9c8ace5 5425d5d |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import os
import config
from transformers import AutoTokenizer
if config.USE_REMOTE:
tokenizer = AutoTokenizer.from_pretrained("google/gemma-7b", trust_remote_code=True)
else:
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
TOKENIZER_DIR = os.path.join(CURRENT_DIR, "gemma-7b")
tokenizer = AutoTokenizer.from_pretrained(TOKENIZER_DIR, trust_remote_code=True)
tokenizer.comments = "" |