Spaces:
Runtime error
Runtime error
File size: 279 Bytes
ead2dcb |
1 2 3 4 5 6 7 8 9 10 11 12 |
#!/usr/bin/python
import pickle
import gib_detect_train
model_data = pickle.load(open('gib_model.pki', 'rb'))
def detect(text):
model_mat = model_data['mat']
threshold = model_data['thresh']
return gib_detect_train.avg_transition_prob(text, model_mat) > threshold
|