ItsNikolor commited on
Commit
fe4bdc6
·
1 Parent(s): ebeddd5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -20,9 +20,10 @@ def load_model():
20
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
21
 
22
  # assert torch.cuda.is_available()
23
- tokenizer = AutoTokenizer.from_pretrained("distilbert/distilbert-base-cased")
 
24
  model = AutoModelForSequenceClassification.from_pretrained(
25
- "./my_model/checkpoint-513"
26
  ).to(device)
27
 
28
  return tokenizer, model
 
20
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
21
 
22
  # assert torch.cuda.is_available()
23
+ save_dir = "./distilbert/distilbert-base-cased/checkpoint-738"
24
+ tokenizer = AutoTokenizer.from_pretrained(save_dir)
25
  model = AutoModelForSequenceClassification.from_pretrained(
26
+ save_dir
27
  ).to(device)
28
 
29
  return tokenizer, model