vmalapaka commited on
Commit
8b2e87a
·
verified ·
1 Parent(s): 293f49e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,5 +1,7 @@
1
  import streamlit as st
2
  from utils import *
 
 
3
 
4
  if 'HuggingFace_API_Key' not in st.session_state:
5
  st.session_state['HuggingFace_API_Key']=''
@@ -23,7 +25,7 @@ if load_button:
23
  if st.session_state['HuggingFace_API_Key'] !="" and st.session_state['Pinecone_API_Key']!="" :
24
 
25
 
26
- site_data=get_website_data('https://jobs.excelcult.com/wp-sitemap.xml')
27
  st.write("Data retrieved")
28
 
29
  #Split data into chunks
@@ -37,7 +39,7 @@ if load_button:
37
 
38
  #Send data to Pinecone
39
 
40
- push_to_pinecone(st.session_state['Pinecone_API_Key'],"us-east-1","mcqcreator",embeddings,chunks_data)
41
  st.write("Pushed data to Pinecone")
42
 
43
  st.sidebar.success("Data pushed to Pinecone successfully!")
 
1
  import streamlit as st
2
  from utils import *
3
+ import constants
4
+
5
 
6
  if 'HuggingFace_API_Key' not in st.session_state:
7
  st.session_state['HuggingFace_API_Key']=''
 
25
  if st.session_state['HuggingFace_API_Key'] !="" and st.session_state['Pinecone_API_Key']!="" :
26
 
27
 
28
+ site_data=get_website_data(constants.WEBSITE_URL)
29
  st.write("Data retrieved")
30
 
31
  #Split data into chunks
 
39
 
40
  #Send data to Pinecone
41
 
42
+ push_to_pinecone(st.session_state['Pinecone_API_Key'],constants.PINECONE_ENVIRONMENT,constants.PINECONE_INDEX,embeddings,chunks_data)
43
  st.write("Pushed data to Pinecone")
44
 
45
  st.sidebar.success("Data pushed to Pinecone successfully!")