Slfagrouche commited on
Commit
14bb6af
·
verified ·
1 Parent(s): 1fe2645

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -31,12 +31,12 @@ from langchain_community.embeddings import HuggingFaceEmbeddings
31
  from langchain_community.llms import HuggingFacePipeline
32
 
33
  # Get secret keys.
34
- os.environ["OPENAI_API_KEY"] = getpass.getpass()
35
- os.environ["MONGO_URI"] = getpass.getpass()
36
 
37
  # Retrieve environment variables.
38
- OPENAI_API_KEY = os.getenv('OPENAI_API_KEY')
39
- MONGO_URI = os.getenv('MONGO_URI')
40
 
41
  # Append our directory path to the Python system path.
42
  directory_path = "Syllaby"
@@ -51,7 +51,7 @@ my_pdfs = os.listdir(directory_path)
51
  my_pdfs
52
 
53
  # Connect to MongoDB Atlas cluster using the connection string.
54
- cluster = MongoClient(MONGO_URI)
55
 
56
  # Define the MongoDB database and collection name.
57
  DB_NAME = "pdfs"
 
31
  from langchain_community.llms import HuggingFacePipeline
32
 
33
  # Get secret keys.
34
+ os.environ["OPENAI_API_KEY"] = OPENAI_API_KEY
35
+ os.environ["MONGO_URI"] = MONGO_URI
36
 
37
  # Retrieve environment variables.
38
+ OPENAI_API_KEYY = os.getenv('OPENAI_API_KEY')
39
+ MONGO_URII = os.getenv('MONGO_URI')
40
 
41
  # Append our directory path to the Python system path.
42
  directory_path = "Syllaby"
 
51
  my_pdfs
52
 
53
  # Connect to MongoDB Atlas cluster using the connection string.
54
+ cluster = MongoClient(MONGO_URII)
55
 
56
  # Define the MongoDB database and collection name.
57
  DB_NAME = "pdfs"