Update config.py
Browse files
config.py
CHANGED
@@ -9,22 +9,16 @@ VALID_BATCH_SIZE = 4
|
|
9 |
EPOCHS = 5
|
10 |
|
11 |
# Folder to contain all the datasets
|
12 |
-
|
13 |
-
# print("hi")
|
14 |
-
# hf_hub_download(repo_id="thak123/bert-emoji-latvian-twitter-classifier", filename="model.bin",local_dir="./")
|
15 |
|
16 |
-
|
17 |
-
# snapshot_download(repo_id="thak123/bert-emoji-latvian-twitter-classifier", allow_patterns="*.bin")
|
18 |
|
19 |
|
20 |
-
|
21 |
-
URL = "https://huggingface.co/thak123/bert-emoji-latvian-twitter-classifier/resolve/main/model.bin"
|
22 |
-
response = requests.get(URL)
|
23 |
-
open("model.bin", "wb").write(response.content)
|
24 |
|
|
|
|
|
25 |
|
26 |
-
DATASET_LOCATION = "" #
|
27 |
-
MODEL_PATH = "model.bin"
|
28 |
|
29 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
30 |
|
|
|
9 |
EPOCHS = 5
|
10 |
|
11 |
# Folder to contain all the datasets
|
12 |
+
from huggingface_hub import hf_hub_download
|
|
|
|
|
13 |
|
14 |
+
DATASET_LOCATION = "" #
|
|
|
15 |
|
16 |
|
17 |
+
MODEL_PATH = hf_hub_download(repo_id="thak123/bert-emoji-latvian-twitter-classifier", filename="model.bin")
|
|
|
|
|
|
|
18 |
|
19 |
+
# from huggingface_hub import snapshot_download
|
20 |
+
# snapshot_download(repo_id="thak123/bert-emoji-latvian-twitter-classifier", allow_patterns="*.bin")
|
21 |
|
|
|
|
|
22 |
|
23 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
24 |
|