password-security / start.py
ierhon's picture
Update start.py
8e00435
raw
history blame
447 Bytes
from tensorflow.keras.models import load_model
from tensorflow.keras.preprocessing.sequence import pad_sequences
import numpy as np
model = load_model("net.h5")
def preprocess(text: str):
return np.array(pad_sequences([[ord(char) for char in text],], maxlen=32, padding='post'))
def clf(text: str):
return model.predict(preprocess(text))
if __name__ == "__main__":
while True:
print("Secure:", clf(input("Password: "))[0])