ankush-003 commited on
Commit
78871dc
1 Parent(s): 92fdd7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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)
31
 
32
- return payload_text, prediction['label'], prediction['score'] * 100
33
 
34
  input_elements = [gr.Textbox(label="Enter Username"), gr.Textbox(label="Enter Password"), gr.Dropdown(["Malitious", "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)
31
 
32
+ return payload_text, prediction[0]['label'], prediction[0]['score'] * 100
33
 
34
  input_elements = [gr.Textbox(label="Enter Username"), gr.Textbox(label="Enter Password"), gr.Dropdown(["Malitious", "Benign"], label="Expected", info="Enter expected value"),
35
  gr.Textbox(label="Enter Payload", info="Optional if username and password entered already")]