File size: 446 Bytes
3341e01 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
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]) |