thak123 commited on
Commit
7f32c66
·
1 Parent(s): ba0c1c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -11,9 +11,12 @@ import gradio as gr
11
 
12
  # DEVICE = config.device
13
 
 
 
 
14
  classifier = pipeline("sentiment-analysis",
15
- model= "thak123/bert-emoji-latvian-twitter-classifier",
16
- tokenizer = "FFZG-cleopatra/bert-emoji-latvian-twitter")
17
 
18
  # MODEL = BERTBaseUncased()
19
  # MODEL.load_state_dict(torch.load(config.MODEL_PATH, map_location=torch.device(DEVICE)))
 
11
 
12
  # DEVICE = config.device
13
 
14
+ model = AutoModel.from_pretrained("thak123/bert-emoji-latvian-twitter-classifier")
15
+ tokenizer = AutoTokenizer.from_pretrained("FFZG-cleopatra/bert-emoji-latvian-twitter")
16
+
17
  classifier = pipeline("sentiment-analysis",
18
+ model= model,
19
+ tokenizer = tokenizer)
20
 
21
  # MODEL = BERTBaseUncased()
22
  # MODEL.load_state_dict(torch.load(config.MODEL_PATH, map_location=torch.device(DEVICE)))