Instructions to use MoyAI/password-security with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use MoyAI/password-security with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://MoyAI/password-security") - Notebooks
- Google Colab
- Kaggle
Update start.py
Browse files
start.py
CHANGED
|
@@ -5,7 +5,7 @@ import numpy as np
|
|
| 5 |
model = load_model("net.h5")
|
| 6 |
|
| 7 |
def preprocess(text: str):
|
| 8 |
-
return np.array(pad_sequences([[ord(char) for char in text],], maxlen=
|
| 9 |
|
| 10 |
def clf(text: str):
|
| 11 |
return model.predict(preprocess(text))
|
|
|
|
| 5 |
model = load_model("net.h5")
|
| 6 |
|
| 7 |
def preprocess(text: str):
|
| 8 |
+
return np.array(pad_sequences([[ord(char) for char in text],], maxlen=32, padding='post'))
|
| 9 |
|
| 10 |
def clf(text: str):
|
| 11 |
return model.predict(preprocess(text))
|