Update config.py
Browse files
config.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import transformers
|
2 |
import os
|
3 |
import torch
|
|
|
4 |
|
5 |
MAX_LEN = 150 #256
|
6 |
TRAIN_BATCH_SIZE = 8
|
@@ -12,14 +13,15 @@ EPOCHS = 5
|
|
12 |
# print("hi")
|
13 |
# hf_hub_download(repo_id="thak123/bert-emoji-latvian-twitter-classifier", filename="model.bin",local_dir="./")
|
14 |
|
15 |
-
from huggingface_hub import snapshot_download
|
16 |
-
snapshot_download(repo_id="thak123/bert-emoji-latvian-twitter-classifier", allow_patterns="*.bin")
|
17 |
|
18 |
|
19 |
# import requests
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
23 |
|
24 |
DATASET_LOCATION = "" #
|
25 |
MODEL_PATH = "model.bin"
|
|
|
1 |
import transformers
|
2 |
import os
|
3 |
import torch
|
4 |
+
import requests
|
5 |
|
6 |
MAX_LEN = 150 #256
|
7 |
TRAIN_BATCH_SIZE = 8
|
|
|
13 |
# print("hi")
|
14 |
# hf_hub_download(repo_id="thak123/bert-emoji-latvian-twitter-classifier", filename="model.bin",local_dir="./")
|
15 |
|
16 |
+
# from huggingface_hub import snapshot_download
|
17 |
+
# snapshot_download(repo_id="thak123/bert-emoji-latvian-twitter-classifier", allow_patterns="*.bin")
|
18 |
|
19 |
|
20 |
# import requests
|
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"
|