Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ import docx
|
|
12 |
from groq import Groq
|
13 |
import PyPDF2
|
14 |
import requests
|
15 |
-
from streamlit_extras.st_autorefresh import st_autorefresh
|
16 |
|
17 |
# --- Document Loaders ---
|
18 |
def extract_text_from_pdf(pdf_path):
|
@@ -133,8 +133,9 @@ if not all([account_sid, auth_token, GROQ_API_KEY]):
|
|
133 |
conversation_sid = st.text_input("Enter Conversation SID", value="")
|
134 |
|
135 |
# Auto-refresh toggle and interval selector
|
136 |
-
enable_autorefresh = st.
|
137 |
interval_seconds = st.selectbox("Refresh Interval (seconds)", options=[5, 10, 15, 30, 60], index=1)
|
|
|
138 |
if enable_autorefresh:
|
139 |
st_autorefresh(interval=interval_seconds * 1000, key="auto-refresh")
|
140 |
|
|
|
12 |
from groq import Groq
|
13 |
import PyPDF2
|
14 |
import requests
|
15 |
+
from streamlit_extras.st_autorefresh import st_autorefresh # <- fixed import
|
16 |
|
17 |
# --- Document Loaders ---
|
18 |
def extract_text_from_pdf(pdf_path):
|
|
|
133 |
conversation_sid = st.text_input("Enter Conversation SID", value="")
|
134 |
|
135 |
# Auto-refresh toggle and interval selector
|
136 |
+
enable_autorefresh = st.checkbox("π Enable Auto-Refresh", value=True)
|
137 |
interval_seconds = st.selectbox("Refresh Interval (seconds)", options=[5, 10, 15, 30, 60], index=1)
|
138 |
+
|
139 |
if enable_autorefresh:
|
140 |
st_autorefresh(interval=interval_seconds * 1000, key="auto-refresh")
|
141 |
|