nppmatt commited on
Commit
b71697e
1 Parent(s): 27817dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -44,4 +44,11 @@ with torch.no_grad():
44
  outputs = model(**batch)
45
  predictions = TF.softmax(outputs.logits, dim=1)
46
  labels = torch.argmax(predictions, dim=1)
47
- labels = [model.config.id2label[label_id] for label_id in labels.tolist()]
 
 
 
 
 
 
 
 
44
  outputs = model(**batch)
45
  predictions = TF.softmax(outputs.logits, dim=1)
46
  labels = torch.argmax(predictions, dim=1)
47
+ labels = [model.config.id2label[label_id] for label_id in labels.tolist()]
48
+
49
+ save_directory = "saved"
50
+ tokenizer.save_pretrained(save_directory)
51
+ model.save_pretrained(save_directory)
52
+
53
+ tokenizer = AutoTokenizer.from_pretrained(save_directory)
54
+ model = AutoModelForSequenceClassification.from_pretrained(save_directory)