Spaces:
Running
Running
Update streamlit_app.py
Browse files- streamlit_app.py +3 -4
streamlit_app.py
CHANGED
@@ -7,7 +7,7 @@ import os
|
|
7 |
|
8 |
st.set_page_config(page_title="Accent Analyzer Agent", page_icon="💬", layout="centered")
|
9 |
|
10 |
-
# Clear chat history
|
11 |
if "initialized" not in st.session_state:
|
12 |
st.session_state.initialized = True
|
13 |
st.session_state.chat_history = []
|
@@ -19,9 +19,8 @@ st.subheader("Ask me to analyze a video URL, e.g.: \n\n> Analyze this video: htt
|
|
19 |
|
20 |
@st.cache_resource
|
21 |
def load_tool_and_agent():
|
22 |
-
|
23 |
-
|
24 |
-
analysis_agent, follow_up_agent = create_agent(tool)
|
25 |
return tool, analysis_agent, follow_up_agent
|
26 |
|
27 |
accent_tool_obj, analysis_agent, follow_up_agent = load_tool_and_agent()
|
|
|
7 |
|
8 |
st.set_page_config(page_title="Accent Analyzer Agent", page_icon="💬", layout="centered")
|
9 |
|
10 |
+
# Clear chat history only once per session
|
11 |
if "initialized" not in st.session_state:
|
12 |
st.session_state.initialized = True
|
13 |
st.session_state.chat_history = []
|
|
|
19 |
|
20 |
@st.cache_resource
|
21 |
def load_tool_and_agent():
|
22 |
+
tool = AccentAnalyzerTool()
|
23 |
+
analysis_agent, follow_up_agent = create_agent(tool)
|
|
|
24 |
return tool, analysis_agent, follow_up_agent
|
25 |
|
26 |
accent_tool_obj, analysis_agent, follow_up_agent = load_tool_and_agent()
|