mahesh1209 commited on
Commit
b9fb564
Β·
verified Β·
1 Parent(s): b529d2b

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -0
app.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def devops_agent(query):
4
+ query = query.lower()
5
+ if "pod status" in query:
6
+ return "βœ… All Kubernetes pods are running."
7
+ elif "restart jenkins" in query:
8
+ return "πŸ”„ Jenkins restarted successfully."
9
+ elif "deploy" in query:
10
+ return "πŸš€ Deployment triggered via CI/CD pipeline."
11
+ elif "check logs" in query:
12
+ return "πŸ“œ Logs retrieved: No errors found."
13
+ elif "disk usage" in query:
14
+ return "πŸ’½ Disk usage: 72% used, 28% free."
15
+ else:
16
+ return "πŸ€– Sorry, I didn’t understand that DevOps command."
17
+
18
+ gr.Interface(
19
+ fn=devops_agent,
20
+ inputs=gr.Textbox(lines=2, placeholder="e.g. Check pod status"),
21
+ outputs="text",
22
+ title="πŸ› οΈ DevOps AI Agent",
23
+ description="Enter a natural language DevOps command. The agent will simulate a response."
24
+ ).launch()