pon / start.py
Manul, da
Create start.py
3341e01
raw
history blame contribute delete
446 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])