Update app.py
Browse files
app.py
CHANGED
@@ -12,20 +12,20 @@ import gradio as gr
|
|
12 |
# DEVICE = config.device
|
13 |
|
14 |
import requests
|
15 |
-
URL = "https://huggingface.co/
|
16 |
response = requests.get(URL)
|
17 |
-
open("
|
18 |
|
19 |
model_path = "pytorch_model.bin"
|
20 |
|
21 |
# model = AutoModel.from_pretrained("thak123/bert-emoji-latvian-twitter-classifier")
|
22 |
# 7 EPOCH Version
|
23 |
-
BERT_PATH = "FFZG-cleopatra/bert-emoji-latvian-twitter"
|
24 |
|
25 |
-
tokenizer = transformers.BertTokenizer.from_pretrained(
|
26 |
-
|
27 |
-
|
28 |
-
)
|
29 |
#AutoTokenizer.from_pretrained("FFZG-cleopatra/bert-emoji-latvian-twitter")
|
30 |
|
31 |
# classifier = pipeline("sentiment-analysis",
|
|
|
12 |
# DEVICE = config.device
|
13 |
|
14 |
import requests
|
15 |
+
URL = "https://huggingface.co/thak123/bert-emoji-latvian-twitter-classifier/resolve/main/model.bin"
|
16 |
response = requests.get(URL)
|
17 |
+
open("model.bin", "wb").write(response.content)
|
18 |
|
19 |
model_path = "pytorch_model.bin"
|
20 |
|
21 |
# model = AutoModel.from_pretrained("thak123/bert-emoji-latvian-twitter-classifier")
|
22 |
# 7 EPOCH Version
|
23 |
+
# BERT_PATH = "FFZG-cleopatra/bert-emoji-latvian-twitter"
|
24 |
|
25 |
+
# tokenizer = transformers.BertTokenizer.from_pretrained(
|
26 |
+
# BERT_PATH,
|
27 |
+
# do_lower_case=True
|
28 |
+
# )
|
29 |
#AutoTokenizer.from_pretrained("FFZG-cleopatra/bert-emoji-latvian-twitter")
|
30 |
|
31 |
# classifier = pipeline("sentiment-analysis",
|