niknikita commited on
Commit
b6cef83
·
1 Parent(s): 43ba9c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -59,10 +59,10 @@ model = DistillBERTClass()
59
  LEARNING_RATE = 1e-05
60
 
61
  optimizer = torch.optim.Adam(params = model.parameters(), lr=LEARNING_RATE)
62
- checkpoint = torch.load("pytorch_distilbert_news.bin", map_location=torch.device('cpu'))
63
- model.load_state_dict(checkpoint['model'])
64
- optimizer.load_state_dict(checkpoint['opt'])
65
- model.to("cpu")
66
 
67
  # print(model)
68
  # model = DistilBertForSequenceClassification.from_pretrained("model/distilbert-model1.pt", local_files_only=True)
 
59
  LEARNING_RATE = 1e-05
60
 
61
  optimizer = torch.optim.Adam(params = model.parameters(), lr=LEARNING_RATE)
62
+ model = torch.load("pytorch_distilbert_news.bin", map_location=torch.device('cpu'))
63
+ # model.load_state_dict(checkpoint['model'])
64
+ # optimizer.load_state_dict(checkpoint['opt'])
65
+ # model.to("cpu")
66
 
67
  # print(model)
68
  # model = DistilBertForSequenceClassification.from_pretrained("model/distilbert-model1.pt", local_files_only=True)