ash-171 commited on
Commit
c12c225
·
verified ·
1 Parent(s): 744a2b5

Update streamlit_app.py

Browse files
Files changed (1) hide show
  1. 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 at the beginning of a new session
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
- with st.spinner("Loading AI models and tools... This might take a moment."):
23
- tool = AccentAnalyzerTool()
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()