Update app.py
Browse files
app.py
CHANGED
@@ -16,6 +16,8 @@ sidebar()
|
|
16 |
|
17 |
st.write("# 🐤 What have they been posting about lately on Mastodon?")
|
18 |
|
|
|
|
|
19 |
st.session_state["api_key_configured"] = True
|
20 |
search_bar, button = st.columns(2)
|
21 |
# Search bar
|
@@ -38,7 +40,7 @@ if st.session_state.get("api_key_configured"):
|
|
38 |
st.session_state.username = username
|
39 |
with st.spinner("🔎"):
|
40 |
try:
|
41 |
-
st.session_state.result = query(username,
|
42 |
except JSONDecodeError as je:
|
43 |
st.error(
|
44 |
"👓 An error occurred reading the results. Is the document store working?"
|
|
|
16 |
|
17 |
st.write("# 🐤 What have they been posting about lately on Mastodon?")
|
18 |
|
19 |
+
pipeline = start_haystack(st.session_state.get("COHERE_API_KEY"))
|
20 |
+
|
21 |
st.session_state["api_key_configured"] = True
|
22 |
search_bar, button = st.columns(2)
|
23 |
# Search bar
|
|
|
40 |
st.session_state.username = username
|
41 |
with st.spinner("🔎"):
|
42 |
try:
|
43 |
+
st.session_state.result = query(username, pipeline)
|
44 |
except JSONDecodeError as je:
|
45 |
st.error(
|
46 |
"👓 An error occurred reading the results. Is the document store working?"
|