changes in the path
Browse files
app.py
CHANGED
@@ -3,15 +3,16 @@ import os
|
|
3 |
import sys
|
4 |
from dotenv import load_dotenv
|
5 |
|
6 |
-
from
|
7 |
# Load environment variables
|
8 |
load_dotenv()
|
9 |
|
10 |
# Add the scripts directory to the system path
|
11 |
script_dir = os.path.dirname(os.path.abspath(__file__))
|
12 |
base_dir = os.path.dirname(script_dir)
|
|
|
13 |
scripts_dir = os.path.join(base_dir, 'scripts')
|
14 |
-
logo_path = os.path.join(base_dir,
|
15 |
sys.path.append(scripts_dir)
|
16 |
|
17 |
# Import functions from the query engine script
|
@@ -33,7 +34,7 @@ def main():
|
|
33 |
st.title("Canada Policy Explorer")
|
34 |
|
35 |
# Initialize Pinecone connection and retrieverC:\Users\agshi\Desktop\Omdena\Canada Policy\TorontoCanadaChapter_CanPolicyInsight\task6_model_deployment\configs
|
36 |
-
config_path = os.path.join(base_dir,
|
37 |
config = load_config(config_path)
|
38 |
pinecone_index = index_connection(config_path)
|
39 |
retriever = initialize_retriever(pinecone_index)
|
|
|
3 |
import sys
|
4 |
from dotenv import load_dotenv
|
5 |
|
6 |
+
from task6_model_deployment.scripts.query_engine import index_connection, initialize_retriever, index_retrieval, load_config
|
7 |
# Load environment variables
|
8 |
load_dotenv()
|
9 |
|
10 |
# Add the scripts directory to the system path
|
11 |
script_dir = os.path.dirname(os.path.abspath(__file__))
|
12 |
base_dir = os.path.dirname(script_dir)
|
13 |
+
print(base_dir)
|
14 |
scripts_dir = os.path.join(base_dir, 'scripts')
|
15 |
+
logo_path = os.path.join(base_dir,'TorontoCanadaChapter_CanPolicyInsight', 'task6_model_deployment', 'assets', 'logo.png')
|
16 |
sys.path.append(scripts_dir)
|
17 |
|
18 |
# Import functions from the query engine script
|
|
|
34 |
st.title("Canada Policy Explorer")
|
35 |
|
36 |
# Initialize Pinecone connection and retrieverC:\Users\agshi\Desktop\Omdena\Canada Policy\TorontoCanadaChapter_CanPolicyInsight\task6_model_deployment\configs
|
37 |
+
config_path = os.path.join(base_dir,'TorontoCanadaChapter_CanPolicyInsight','task6_model_deployment','configs','config.yaml')
|
38 |
config = load_config(config_path)
|
39 |
pinecone_index = index_connection(config_path)
|
40 |
retriever = initialize_retriever(pinecone_index)
|