Girishug commited on
Commit
2edb2ce
·
verified ·
1 Parent(s): 0004517

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +40 -0
  2. requirements.txt +6 -0
app.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # app.py
2
+
3
+ import streamlit as st
4
+ from agents import policy_rag_with_mcp, security_analysis_with_mcp
5
+
6
+ st.set_page_config(page_title="NeoEdge Autonomous Ops", layout="wide")
7
+
8
+ st.title("🧠 NeoEdge Autonomous Ops Assistant")
9
+ st.markdown("Interact with your company policies and security logs using AI-powered agents.")
10
+
11
+ tabs = st.tabs(["📘 HR PolicyBot", "🛡️ System MonitorBot"])
12
+
13
+ # --- HR PolicyBot ---
14
+ with tabs[0]:
15
+ st.subheader("Ask a question about company policies")
16
+ policy_query = st.text_area("Type your policy-related question below", height=100)
17
+ if st.button("Ask PolicyBot", key="policy_button"):
18
+ if policy_query.strip():
19
+ with st.spinner("Thinking..."):
20
+ policy_response = policy_rag_with_mcp(policy_query)
21
+ st.success("✅ PolicyBot Response:")
22
+ st.write(policy_response)
23
+ else:
24
+ st.warning("Please enter a valid question.")
25
+
26
+ # --- MonitorBot ---
27
+ with tabs[1]:
28
+ st.subheader("Submit system logs for analysis")
29
+ logs_input = st.text_area("Paste your logs below", height=200, placeholder="[ERROR] 2025-04-23 ...")
30
+ if st.button("Analyze Logs", key="monitor_button"):
31
+ if logs_input.strip():
32
+ with st.spinner("Analyzing..."):
33
+ analysis_response = security_analysis_with_mcp(logs_input)
34
+ st.success("✅ MonitorBot Analysis:")
35
+ st.write(analysis_response)
36
+ else:
37
+ st.warning("Please provide valid log content.")
38
+
39
+ st.markdown("---")
40
+ st.caption("Powered by CrewAI, LangChain, Cohere, and Streamlit | Built by Girish")
requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ streamlit
2
+ chromadb
3
+ cohere
4
+ langchain
5
+ pydantic
6
+ httpx