DeepSoft-Tech commited on
Commit
d5d9290
·
verified ·
1 Parent(s): ae68bc9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -3
app.py CHANGED
@@ -13,12 +13,25 @@ st.set_page_config(page_title="Search Engine", layout="wide")
13
 
14
  # Set up the Streamlit app title and search bar
15
  st.title("Search Engine")
16
- if st.button("Connect to Search Engine Database", type="primary"):
 
 
 
 
 
17
  index_name = st.text_input("Enter a database name:", "")
18
  key = st.text_input("Enter a key:", "")
19
  namespace = st.text_input("Enter a table name:", "")
20
- # initialize connection to pinecone (get API key at app.pinecone.io)
21
- if key:
 
 
 
 
 
 
 
 
22
  api_key = os.environ.get('PINECONE_API_KEY') or key
23
 
24
  # configure client
 
13
 
14
  # Set up the Streamlit app title and search bar
15
  st.title("Search Engine")
16
+
17
+
18
+ with st.form("my_form"):
19
+ st.write("Login to Search Engine")
20
+ # slider_val = st.slider("Form slider")
21
+ # checkbox_val = st.checkbox("Form checkbox")
22
  index_name = st.text_input("Enter a database name:", "")
23
  key = st.text_input("Enter a key:", "")
24
  namespace = st.text_input("Enter a table name:", "")
25
+
26
+ # Every form must have a submit button.
27
+ submitted = st.form_submit_button("Connect to My Search Engine")
28
+ if submitted:
29
+ # if st.button("Connect to Search Engine Database", type="primary"):
30
+ # index_name = st.text_input("Enter a database name:", "")
31
+ # key = st.text_input("Enter a key:", "")
32
+ # namespace = st.text_input("Enter a table name:", "")
33
+ # # initialize connection to pinecone (get API key at app.pinecone.io)
34
+
35
  api_key = os.environ.get('PINECONE_API_KEY') or key
36
 
37
  # configure client