ankush-003 commited on
Commit
269fec5
1 Parent(s): 0e7f3ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -24,13 +24,12 @@ def predict(username, pwd, label, payload_text = None):
24
 
25
  return model.config.id2label[predicted_class_id]
26
 
 
 
 
27
  demo = gr.Interface(
28
  fn=predict,
29
- inputs=[gr.Textbox(label="Enter Username"),gr.Textbox(label="Enter Password"),
30
- gr.Dropdown(
31
- ["Malitious", "Benign"], label="Expected", info="Enter expected value"
32
- ),
33
- gr.Textbox(label="Enter Payload[optional]")]
34
  outputs=[gr.Textbox(label="Model Prediction")]
35
  )
36
  demo.launch(debug=True)
 
24
 
25
  return model.config.id2label[predicted_class_id]
26
 
27
+ input_elements = [gr.Textbox(label="Enter Username"), gr.Textbox(label="Enter Password"), gr.Dropdown(["Malitious", "Benign"], label="Expected", info="Enter expected value"),
28
+ gr.Textbox(label="Enter Payload[optional]")]
29
+
30
  demo = gr.Interface(
31
  fn=predict,
32
+ inputs=input_elements,
 
 
 
 
33
  outputs=[gr.Textbox(label="Model Prediction")]
34
  )
35
  demo.launch(debug=True)