Spaces:
Running
Running
Update ui/streamlit_app.py
Browse files- ui/streamlit_app.py +11 -15
ui/streamlit_app.py
CHANGED
@@ -12,16 +12,14 @@ from agents.quant_backtester import run_simple_backtest
|
|
12 |
from agents.regu_radar import monitor_regulatory_changes
|
13 |
from agents.client_advisor import advise_client
|
14 |
|
15 |
-
# --- UI Setup ---
|
16 |
st.set_page_config(page_title="FinSightX", layout="wide")
|
17 |
|
18 |
-
st.title("
|
19 |
|
20 |
-
# Sidebar
|
21 |
agent = st.sidebar.selectbox(
|
22 |
"Choose Agent",
|
23 |
[
|
24 |
-
"
|
25 |
"Equity Analyst",
|
26 |
"News Summarizer",
|
27 |
"Macro Strategist",
|
@@ -31,9 +29,7 @@ agent = st.sidebar.selectbox(
|
|
31 |
]
|
32 |
)
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
if agent == "π Home":
|
37 |
st.header("A Multi-Agent Financial Intelligence Assistant")
|
38 |
st.markdown("""
|
39 |
A **modular industry-grade application** where agents collaborate to handle:
|
@@ -47,7 +43,7 @@ if agent == "π Home":
|
|
47 |
""")
|
48 |
|
49 |
elif agent == "Equity Analyst":
|
50 |
-
st.subheader("
|
51 |
st.markdown("""
|
52 |
### Role:
|
53 |
Analyzes individual stocks or companies using:
|
@@ -72,7 +68,7 @@ elif agent == "Equity Analyst":
|
|
72 |
st.markdown(response)
|
73 |
|
74 |
elif agent == "News Summarizer":
|
75 |
-
st.subheader("
|
76 |
st.markdown("""
|
77 |
### Role:
|
78 |
Digest and summarize **real-time or bulk market news** to extract insights and relevance.
|
@@ -93,7 +89,7 @@ elif agent == "News Summarizer":
|
|
93 |
st.markdown(summary)
|
94 |
|
95 |
elif agent == "Macro Strategist":
|
96 |
-
st.subheader("
|
97 |
st.markdown("""
|
98 |
### Role:
|
99 |
Analyzes **macroeconomic indicators** and helps in trend forecasting.
|
@@ -114,11 +110,11 @@ elif agent == "Macro Strategist":
|
|
114 |
if st.button("Forecast"):
|
115 |
with st.spinner("Forecasting..."):
|
116 |
forecast_result = analyze_macro_trends(df)
|
117 |
-
st.write("
|
118 |
st.json(forecast_result)
|
119 |
|
120 |
elif agent == "Quant Backtester":
|
121 |
-
st.subheader("
|
122 |
st.markdown("""
|
123 |
### Role:
|
124 |
Tests trading strategies on historical price data.
|
@@ -144,11 +140,11 @@ elif agent == "Quant Backtester":
|
|
144 |
sma_short=sma_short,
|
145 |
sma_long=sma_long
|
146 |
)
|
147 |
-
st.write("
|
148 |
st.markdown("Note: Visual performance plots not yet integrated in Streamlit.")
|
149 |
|
150 |
elif agent == "ReguRadar":
|
151 |
-
st.subheader("
|
152 |
st.markdown("""
|
153 |
### Role:
|
154 |
Monitors and interprets **regulatory updates** that may affect sectors, firms, or compliance requirements.
|
@@ -169,7 +165,7 @@ elif agent == "ReguRadar":
|
|
169 |
st.markdown(reg_response)
|
170 |
|
171 |
elif agent == "Client Advisor":
|
172 |
-
st.subheader("
|
173 |
st.markdown("""
|
174 |
### Role:
|
175 |
Acts as a **virtual financial advisor**, helping individual users based on their queries and emotional tone.
|
|
|
12 |
from agents.regu_radar import monitor_regulatory_changes
|
13 |
from agents.client_advisor import advise_client
|
14 |
|
|
|
15 |
st.set_page_config(page_title="FinSightX", layout="wide")
|
16 |
|
17 |
+
st.title("FinSightX: AI-Powered Financial Agent Suite")
|
18 |
|
|
|
19 |
agent = st.sidebar.selectbox(
|
20 |
"Choose Agent",
|
21 |
[
|
22 |
+
"Home",
|
23 |
"Equity Analyst",
|
24 |
"News Summarizer",
|
25 |
"Macro Strategist",
|
|
|
29 |
]
|
30 |
)
|
31 |
|
32 |
+
if agent == "Home":
|
|
|
|
|
33 |
st.header("A Multi-Agent Financial Intelligence Assistant")
|
34 |
st.markdown("""
|
35 |
A **modular industry-grade application** where agents collaborate to handle:
|
|
|
43 |
""")
|
44 |
|
45 |
elif agent == "Equity Analyst":
|
46 |
+
st.subheader("Equity Analyst")
|
47 |
st.markdown("""
|
48 |
### Role:
|
49 |
Analyzes individual stocks or companies using:
|
|
|
68 |
st.markdown(response)
|
69 |
|
70 |
elif agent == "News Summarizer":
|
71 |
+
st.subheader("News Summarizer")
|
72 |
st.markdown("""
|
73 |
### Role:
|
74 |
Digest and summarize **real-time or bulk market news** to extract insights and relevance.
|
|
|
89 |
st.markdown(summary)
|
90 |
|
91 |
elif agent == "Macro Strategist":
|
92 |
+
st.subheader("Macro Trend Forecaster")
|
93 |
st.markdown("""
|
94 |
### Role:
|
95 |
Analyzes **macroeconomic indicators** and helps in trend forecasting.
|
|
|
110 |
if st.button("Forecast"):
|
111 |
with st.spinner("Forecasting..."):
|
112 |
forecast_result = analyze_macro_trends(df)
|
113 |
+
st.write("Forecasted Value:")
|
114 |
st.json(forecast_result)
|
115 |
|
116 |
elif agent == "Quant Backtester":
|
117 |
+
st.subheader("Quant Strategy Backtester")
|
118 |
st.markdown("""
|
119 |
### Role:
|
120 |
Tests trading strategies on historical price data.
|
|
|
140 |
sma_short=sma_short,
|
141 |
sma_long=sma_long
|
142 |
)
|
143 |
+
st.write("Backtest completed. Check your terminal/logs for output.")
|
144 |
st.markdown("Note: Visual performance plots not yet integrated in Streamlit.")
|
145 |
|
146 |
elif agent == "ReguRadar":
|
147 |
+
st.subheader("ReguRadar β Regulatory Monitor")
|
148 |
st.markdown("""
|
149 |
### Role:
|
150 |
Monitors and interprets **regulatory updates** that may affect sectors, firms, or compliance requirements.
|
|
|
165 |
st.markdown(reg_response)
|
166 |
|
167 |
elif agent == "Client Advisor":
|
168 |
+
st.subheader("Client Advisor")
|
169 |
st.markdown("""
|
170 |
### Role:
|
171 |
Acts as a **virtual financial advisor**, helping individual users based on their queries and emotional tone.
|