Spaces:
Sleeping
Sleeping
Infinitode Pty Ltd
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,9 @@ import joblib
|
|
| 3 |
from sklearn.feature_extraction.text import TfidfVectorizer
|
| 4 |
from sklearn.calibration import CalibratedClassifierCV
|
| 5 |
|
|
|
|
|
|
|
|
|
|
| 6 |
def predictPasswordStrength(model, vectorizer, password_input):
|
| 7 |
password_tfidf = vectorizer.transform([password_input])
|
| 8 |
|
|
@@ -21,9 +24,6 @@ def predictPasswordStrength(model, vectorizer, password_input):
|
|
| 21 |
|
| 22 |
return password_input, output, confidence
|
| 23 |
|
| 24 |
-
model = joblib.load("helix-psa.pkl")
|
| 25 |
-
vectorizer = joblib.load("helix-psa-vectorizer.pkl")
|
| 26 |
-
|
| 27 |
demo = gr.Interface(
|
| 28 |
fn=predictPasswordStrength,
|
| 29 |
inputs=[gr.Textbox('Hello123', label='Password', info='The password to check the strength of', max_lines=1)],
|
|
|
|
| 3 |
from sklearn.feature_extraction.text import TfidfVectorizer
|
| 4 |
from sklearn.calibration import CalibratedClassifierCV
|
| 5 |
|
| 6 |
+
model = joblib.load("helix-psa.pkl")
|
| 7 |
+
vectorizer = joblib.load("helix-psa-vectorizer.pkl")
|
| 8 |
+
|
| 9 |
def predictPasswordStrength(model, vectorizer, password_input):
|
| 10 |
password_tfidf = vectorizer.transform([password_input])
|
| 11 |
|
|
|
|
| 24 |
|
| 25 |
return password_input, output, confidence
|
| 26 |
|
|
|
|
|
|
|
|
|
|
| 27 |
demo = gr.Interface(
|
| 28 |
fn=predictPasswordStrength,
|
| 29 |
inputs=[gr.Textbox('Hello123', label='Password', info='The password to check the strength of', max_lines=1)],
|