sabatale commited on
Commit
c721b0c
·
verified ·
1 Parent(s): 4951701

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -15
app.py CHANGED
@@ -16,21 +16,16 @@ sidebar()
16
 
17
  st.write("# 🐤 What have they been posting about lately on Mastodon?")
18
 
19
- if st.session_state.get("OPENAI_API_KEY"):
20
- pipeline = start_haystack(st.session_state.get("OPENAI_API_KEY"))
21
- st.session_state["api_key_configured"] = True
22
- search_bar, button = st.columns(2)
23
- # Search bar
24
- with search_bar:
25
- username = st.text_input("Please provide a Mastodon username", on_change=reset_results)
26
-
27
- with button:
28
- st.write("")
29
- st.write("")
30
- run_pressed = st.button("Search posts (toots)")
31
- else:
32
- st.write("Please provide your OpenAI Key to start using the application")
33
- st.write("If you are using a smaller screen, open the sidebar from the top left to provide your OpenAI Key 🙌")
34
 
35
  if st.session_state.get("api_key_configured"):
36
  run_query = (
 
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
22
+ with search_bar:
23
+ username = st.text_input("Your question", on_change=reset_results)
24
+
25
+ with button:
26
+ st.write("")
27
+ st.write("")
28
+ run_pressed = st.button("Ask")
 
 
 
 
 
29
 
30
  if st.session_state.get("api_key_configured"):
31
  run_query = (