blazingbunny commited on
Commit
13768e6
·
1 Parent(s): 20ec83a

Rename main.py to app.py

Browse files
Files changed (1) hide show
  1. main.py → app.py +4 -2
main.py → app.py RENAMED
@@ -12,7 +12,9 @@ def fetch_data(query, api_key):
12
  # Streamlit UI
13
  st.title('Google Knowledge Graph Search')
14
 
15
- api_key = st.text_input('Enter your Google API Key:', type="password")
 
 
16
  search_query = st.text_input('Enter Search Query:', 'Python Programming')
17
 
18
  if st.button('Search'):
@@ -26,4 +28,4 @@ if st.button('Search'):
26
  except:
27
  st.write('No results found.')
28
  else:
29
- st.write('Please enter an API key.')
 
12
  # Streamlit UI
13
  st.title('Google Knowledge Graph Search')
14
 
15
+ # Fetch API key from secrets.toml
16
+ api_key = st.secrets["gkg"]["api_key"]
17
+
18
  search_query = st.text_input('Enter Search Query:', 'Python Programming')
19
 
20
  if st.button('Search'):
 
28
  except:
29
  st.write('No results found.')
30
  else:
31
+ st.write('API key is missing.')