Spaces:
Sleeping
Sleeping
Update streamlit_app.py
Browse files- streamlit_app.py +7 -2
streamlit_app.py
CHANGED
@@ -7,6 +7,11 @@ import os
|
|
7 |
|
8 |
st.set_page_config(page_title="Accent Analyzer Agent", page_icon="💬", layout="centered")
|
9 |
|
|
|
|
|
|
|
|
|
|
|
10 |
st.warning("⚠️ High latency due to CPU usage. Once migrated to GPU, response time will improve significantly.")
|
11 |
|
12 |
st.title("English Accent Analyzer (Conversational)")
|
@@ -21,8 +26,8 @@ def load_tool_and_agent():
|
|
21 |
|
22 |
accent_tool_obj, analysis_agent, follow_up_agent = load_tool_and_agent()
|
23 |
|
24 |
-
if "chat_history" not in st.session_state:
|
25 |
-
|
26 |
|
27 |
if hasattr(accent_tool_obj, "last_transcript") and accent_tool_obj.last_transcript:
|
28 |
prompt_label = "Ask more about the video..."
|
|
|
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 = []
|
14 |
+
|
15 |
st.warning("⚠️ High latency due to CPU usage. Once migrated to GPU, response time will improve significantly.")
|
16 |
|
17 |
st.title("English Accent Analyzer (Conversational)")
|
|
|
26 |
|
27 |
accent_tool_obj, analysis_agent, follow_up_agent = load_tool_and_agent()
|
28 |
|
29 |
+
# if "chat_history" not in st.session_state:
|
30 |
+
# st.session_state.chat_history = []
|
31 |
|
32 |
if hasattr(accent_tool_obj, "last_transcript") and accent_tool_obj.last_transcript:
|
33 |
prompt_label = "Ask more about the video..."
|