DrishtiSharma commited on
Commit
e44d3c0
·
verified ·
1 Parent(s): 117de7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -89,6 +89,9 @@ class DocumentRAG:
89
 
90
 
91
  def _get_embedding_model(self):
 
 
 
92
  if self.embedding_choice == "OpenAI":
93
  return OpenAIEmbeddings(api_key=self.api_key)
94
  else:
@@ -100,10 +103,6 @@ class DocumentRAG:
100
 
101
 
102
 
103
- if not self.api_key:
104
- raise ValueError("API Key not found. Make sure to set the 'OPENAI_API_KEY' environment variable.")
105
-
106
-
107
 
108
  def process_documents(self, uploaded_files):
109
  """Process uploaded files by saving them temporarily and extracting content."""
 
89
 
90
 
91
  def _get_embedding_model(self):
92
+ if not self.api_key:
93
+ raise ValueError("API Key not found. Make sure to set the 'OPENAI_API_KEY' environment variable.")
94
+
95
  if self.embedding_choice == "OpenAI":
96
  return OpenAIEmbeddings(api_key=self.api_key)
97
  else:
 
103
 
104
 
105
 
 
 
 
 
106
 
107
  def process_documents(self, uploaded_files):
108
  """Process uploaded files by saving them temporarily and extracting content."""