Update app.py
Browse files
app.py
CHANGED
@@ -74,9 +74,11 @@ def initialize_agents():
|
|
74 |
st.session_state.chat_active = True
|
75 |
return None
|
76 |
|
|
|
|
|
|
|
77 |
|
78 |
-
|
79 |
-
app = st.session_state.app
|
80 |
|
81 |
# Function to invoke the agent and generate a response
|
82 |
def generate_response(topic):
|
@@ -135,5 +137,3 @@ st.markdown(
|
|
135 |
""",
|
136 |
unsafe_allow_html=True,
|
137 |
)
|
138 |
-
|
139 |
-
|
|
|
74 |
st.session_state.chat_active = True
|
75 |
return None
|
76 |
|
77 |
+
# Automatically initialize agents on app load
|
78 |
+
if "app" not in st.session_state or st.session_state.app is None:
|
79 |
+
st.session_state.app = initialize_agents()
|
80 |
|
81 |
+
app = st.session_state.app
|
|
|
82 |
|
83 |
# Function to invoke the agent and generate a response
|
84 |
def generate_response(topic):
|
|
|
137 |
""",
|
138 |
unsafe_allow_html=True,
|
139 |
)
|
|
|
|