xeroISB commited on
Commit
3efad8a
·
verified ·
1 Parent(s): d4ea88f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -66,16 +66,16 @@ def predict(short_description, impact, priority, category, urgency):
66
 
67
  # Define Gradio interface
68
  inputs = [
69
- gr.inputs.Textbox(lines=2, placeholder="Enter short description...", label="Short Description"),
70
- gr.inputs.Textbox(lines=1, placeholder="Enter impact...", label="Impact (e.g., '2 - Medium')"),
71
- gr.inputs.Textbox(lines=1, placeholder="Enter priority...", label="Priority (e.g., '2 - Medium')"),
72
- gr.inputs.Textbox(lines=1, placeholder="Enter category...", label="Category (e.g., 'Network')"),
73
- gr.inputs.Textbox(lines=1, placeholder="Enter urgency...", label="Urgency (e.g., '1 - High')")
74
  ]
75
 
76
  outputs = [
77
- gr.outputs.Textbox(label="Predicted Duration Bin"),
78
- gr.outputs.Textbox(label="Sentiment Score")
79
  ]
80
 
81
  interface = gr.Interface(fn=predict, inputs=inputs, outputs=outputs, title="Issue Resolution Predictor", description="Predict the duration bin and sentiment score based on issue description and related features.")
 
66
 
67
  # Define Gradio interface
68
  inputs = [
69
+ gr.components.Textbox(lines=2, placeholder="Enter short description...", label="Short Description"),
70
+ gr.components.Textbox(lines=1, placeholder="Enter impact...", label="Impact (e.g., '2 - Medium')"),
71
+ gr.components.Textbox(lines=1, placeholder="Enter priority...", label="Priority (e.g., '2 - Medium')"),
72
+ gr.components.Textbox(lines=1, placeholder="Enter category...", label="Category (e.g., 'Network')"),
73
+ gr.components.Textbox(lines=1, placeholder="Enter urgency...", label="Urgency (e.g., '1 - High')")
74
  ]
75
 
76
  outputs = [
77
+ gr.components.Textbox(label="Predicted Duration Bin"),
78
+ gr.components.Textbox(label="Sentiment Score")
79
  ]
80
 
81
  interface = gr.Interface(fn=predict, inputs=inputs, outputs=outputs, title="Issue Resolution Predictor", description="Predict the duration bin and sentiment score based on issue description and related features.")