thak123 commited on
Commit
6d9deb3
1 Parent(s): dc3b9a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -12,20 +12,20 @@ import gradio as gr
12
  # DEVICE = config.device
13
 
14
  import requests
15
- URL = "https://huggingface.co/FFZG-cleopatra/bert-emoji-latvian-twitter/blob/main/pytorch_model.bin"
16
  response = requests.get(URL)
17
- open("pytorch_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",
 
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",