Spaces:
Runtime error
Runtime error
ankush-003
commited on
Commit
•
4684a0e
1
Parent(s):
42d51db
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def predict(username, pwd, label, payload_text = None):
|
|
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")]
|
|
|
29 |
# print(model.config.id2label[predicted_class_id])
|
30 |
prediction = classifier(payload_text)[0]
|
31 |
|
32 |
+
return payload_text, {prediction["label"]: prediction["score"]}
|
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")]
|