ifmain commited on
Commit
6b43b9e
1 Parent(s): 9ac2944

Update test.py

Browse files
Files changed (1) hide show
  1. test.py +0 -10
test.py CHANGED
@@ -59,13 +59,3 @@ def predict(model, embeddings):
59
 
60
  return {"category_scores": result, 'detect': detected, 'detected': detect_value}
61
 
62
-
63
- print('Load model')
64
- moderation = ModerationModel()
65
- moderation.load_state_dict(torch.load('moderation_model.pth'))
66
-
67
- text = "I want to kill them."
68
-
69
- embeddings_for_prediction = getEmb(text)
70
- prediction = predict(moderation, embeddings_for_prediction)
71
- print(json.dumps(prediction,indent=4))
 
59
 
60
  return {"category_scores": result, 'detect': detected, 'detected': detect_value}
61