gibberish_detector / gib_detect.py
Al John Lexter Lozano
Initial commit-make model as importable module and add simple gradio interface
ead2dcb
raw
history blame
289 Bytes
#!/usr/bin/python
import pickle
import gib_detect_train
model_data = pickle.load(open('gib_model.pki', 'rb'))
while True:
l = raw_input()
model_mat = model_data['mat']
threshold = model_data['thresh']
print gib_detect_train.avg_transition_prob(l, model_mat) > threshold