ressay1973 commited on
Commit
f3b12e7
·
verified ·
1 Parent(s): e292ac5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py CHANGED
@@ -48,3 +48,17 @@ agent = CodeAgent(
48
  description=None,
49
  prompt_templates=prompt_templates
50
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  description=None,
49
  prompt_templates=prompt_templates
50
  )
51
+ def classify_alert_ui(service_criticity, disruption, affectation_time, magnitude, business_workaround):
52
+ return agent.run(service_criticity, disruption, affectation_time, magnitude, business_workaround)
53
+
54
+ iface = gr.Interface(
55
+ fn=classify_alert_ui,
56
+ inputs=["text", "text", "text", "text", "text"],
57
+ outputs="text",
58
+ title="Clasificación de Incidentes",
59
+ description="Ingresa los detalles del incidente para clasificarlo como P1, P2 o P3."
60
+ )
61
+
62
+ if __name__ == "__main__":
63
+ print("Launching Gradio interface...")
64
+ iface.launch()