|
import transformers |
|
import os |
|
import torch |
|
import requests |
|
|
|
MAX_LEN = 150 |
|
TRAIN_BATCH_SIZE = 8 |
|
VALID_BATCH_SIZE = 4 |
|
EPOCHS = 5 |
|
|
|
|
|
from huggingface_hub import hf_hub_download |
|
|
|
DATASET_LOCATION = "" |
|
print("hi") |
|
|
|
MODEL_PATH = hf_hub_download(repo_id="thak123/bert-emoji-latvian-twitter-classifier", filename="model.bin") |
|
|
|
|
|
|
|
|
|
|
|
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') |
|
|
|
|
|
BERT_PATH = "FFZG-cleopatra/bert-emoji-latvian-twitter" |
|
|
|
|
|
|
|
|
|
TOKENIZER = transformers.BertTokenizer.from_pretrained( |
|
BERT_PATH, |
|
do_lower_case=True |
|
) |
|
|
|
|
|
|
|
|