Farid Karimli commited on
Commit
9a544d2
·
1 Parent(s): c68577f

Removing API keys and more cleanup

Browse files
code/modules/dataloader/data_loader.py CHANGED
@@ -53,11 +53,10 @@ class LlamaParser:
53
  def __init__(self):
54
  self.GPT_API_KEY = OPENAI_API_KEY
55
  self.LLAMA_CLOUD_API_KEY = LLAMA_CLOUD_API_KEY
56
- print(f"LLAMA_CLOUD_API_KEY: {LLAMA_CLOUD_API_KEY}")
57
  self.parse_url = "https://api.cloud.llamaindex.ai/api/parsing/upload"
58
  self.headers = {
59
  'Accept': 'application/json',
60
- 'Authorization': 'Bearer llx-vap5Bk2zbYLfqTq2aZDvNHwscvsBPQiSjvLOGkgUa9SS8CWB'
61
  }
62
  self.parser = LlamaParse(
63
  api_key=LLAMA_CLOUD_API_KEY,
@@ -189,7 +188,6 @@ class FileReader:
189
 
190
  @staticmethod
191
  def download_pdf_from_url(pdf_url):
192
- print("Downloading PDF from URL: ", pdf_url)
193
  response = requests.get(pdf_url)
194
  if response.status_code == 200:
195
  with tempfile.NamedTemporaryFile(delete=False, suffix=".pdf") as temp_file:
 
53
  def __init__(self):
54
  self.GPT_API_KEY = OPENAI_API_KEY
55
  self.LLAMA_CLOUD_API_KEY = LLAMA_CLOUD_API_KEY
 
56
  self.parse_url = "https://api.cloud.llamaindex.ai/api/parsing/upload"
57
  self.headers = {
58
  'Accept': 'application/json',
59
+ 'Authorization': f'Bearer {LLAMA_CLOUD_API_KEY}'
60
  }
61
  self.parser = LlamaParse(
62
  api_key=LLAMA_CLOUD_API_KEY,
 
188
 
189
  @staticmethod
190
  def download_pdf_from_url(pdf_url):
 
191
  response = requests.get(pdf_url)
192
  if response.status_code == 200:
193
  with tempfile.NamedTemporaryFile(delete=False, suffix=".pdf") as temp_file: