Spaces:
Running
Running
Deploy SupportPulse demo: Gradio triage interface with pre-computed results
Browse files
app.py
CHANGED
|
@@ -296,6 +296,14 @@ with gr.Blocks(title="SupportPulse Intelligence Platform") as demo:
|
|
| 296 |
with gr.Row():
|
| 297 |
with gr.Column(scale=1):
|
| 298 |
gr.HTML("<h3 style='color:#f1f5f9; margin:0 0 12px'>Submit Support Ticket</h3>")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 299 |
subject_in = gr.Textbox(
|
| 300 |
label="Ticket Subject",
|
| 301 |
placeholder="e.g. Production API returning 500 errors for all users",
|
|
@@ -307,11 +315,17 @@ with gr.Blocks(title="SupportPulse Intelligence Platform") as demo:
|
|
| 307 |
lines=5,
|
| 308 |
)
|
| 309 |
btn = gr.Button("Run AI Triage Pipeline", variant="primary", size="lg")
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 315 |
)
|
| 316 |
|
| 317 |
gr.HTML("<hr style='border-color: #1e293b; margin: 20px 0;'>")
|
|
|
|
| 296 |
with gr.Row():
|
| 297 |
with gr.Column(scale=1):
|
| 298 |
gr.HTML("<h3 style='color:#f1f5f9; margin:0 0 12px'>Submit Support Ticket</h3>")
|
| 299 |
+
|
| 300 |
+
# Better UX for examples
|
| 301 |
+
scenario_dropdown = gr.Dropdown(
|
| 302 |
+
label="Quick Select Scenario (Optional)",
|
| 303 |
+
choices=[ex[0] for ex in EXAMPLES],
|
| 304 |
+
info="Choose a pre-made ticket or type your own below"
|
| 305 |
+
)
|
| 306 |
+
|
| 307 |
subject_in = gr.Textbox(
|
| 308 |
label="Ticket Subject",
|
| 309 |
placeholder="e.g. Production API returning 500 errors for all users",
|
|
|
|
| 315 |
lines=5,
|
| 316 |
)
|
| 317 |
btn = gr.Button("Run AI Triage Pipeline", variant="primary", size="lg")
|
| 318 |
+
|
| 319 |
+
def load_example(choice):
|
| 320 |
+
for ex in EXAMPLES:
|
| 321 |
+
if ex[0] == choice:
|
| 322 |
+
return ex[0], ex[1]
|
| 323 |
+
return "", ""
|
| 324 |
+
|
| 325 |
+
scenario_dropdown.change(
|
| 326 |
+
fn=load_example,
|
| 327 |
+
inputs=[scenario_dropdown],
|
| 328 |
+
outputs=[subject_in, body_in]
|
| 329 |
)
|
| 330 |
|
| 331 |
gr.HTML("<hr style='border-color: #1e293b; margin: 20px 0;'>")
|