Spaces:
Sleeping
Sleeping
File size: 478 Bytes
008d777 f982838 008d777 f982838 008d777 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import numpy as np
from tensorflow.keras.preprocessing.sequence import pad_sequences
from huggingface_hub import from_pretrained_keras
model = from_pretrained_keras("MoyAI/password-security")
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])
|