Spaces:
Runtime error
Runtime error
ankush-003
commited on
Commit
•
42d51db
1
Parent(s):
e646e66
Update app.py
Browse files
app.py
CHANGED
@@ -27,12 +27,9 @@ def predict(username, pwd, label, payload_text = None):
|
|
27 |
# logits = model(**inputs).logits
|
28 |
# predicted_class_id = int(tf.math.argmax(logits, axis=-1)[0])
|
29 |
# print(model.config.id2label[predicted_class_id])
|
30 |
-
prediction = classifier(payload_text)
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
}
|
35 |
-
return payload_text, scores
|
36 |
|
37 |
input_elements = [gr.Textbox(label="Enter Username"), gr.Textbox(label="Enter Password"), gr.Dropdown(["Malicious", "Benign"], label="Expected", info="Enter expected value"),
|
38 |
gr.Textbox(label="Enter Payload", info="Optional if username and password entered already")]
|
|
|
27 |
# logits = model(**inputs).logits
|
28 |
# predicted_class_id = int(tf.math.argmax(logits, axis=-1)[0])
|
29 |
# print(model.config.id2label[predicted_class_id])
|
30 |
+
prediction = classifier(payload_text)[0]
|
31 |
+
|
32 |
+
return payload_text, prediction
|
|
|
|
|
|
|
33 |
|
34 |
input_elements = [gr.Textbox(label="Enter Username"), gr.Textbox(label="Enter Password"), gr.Dropdown(["Malicious", "Benign"], label="Expected", info="Enter expected value"),
|
35 |
gr.Textbox(label="Enter Payload", info="Optional if username and password entered already")]
|