NEXAS commited on
Commit
596bc82
·
verified ·
1 Parent(s): 4d7413d

Update utils/ingest1.py

Browse files
Files changed (1) hide show
  1. utils/ingest1.py +2 -2
utils/ingest1.py CHANGED
@@ -36,7 +36,7 @@ def load_or_parse_data(loc):
36
  parsed_data = pickle.load(f)
37
  else:
38
  # Perform the parsing step and store the result in llama_parse_documents
39
- parsingInstructiontest10k = """The provided document is an entry level machine learning textbook with example code and outputs.
40
  It contains many images and tables.
41
  Try to be precise while answering the questions"""
42
  parser = LlamaParse(api_key=llamaparse_api_key, result_type="markdown", parsing_instruction=parsingInstructiontest10k)
@@ -70,7 +70,7 @@ def create_vector_database(loc):
70
  #with open('data/output.md', 'a') as f: # Open the file in append mode ('a')
71
  # for doc in llama_parse_documents:
72
  # f.write(doc.text + '\n')
73
- with open(output_md, 'a', encoding='utf-8') as f: # Open the file in append mode ('a')
74
  for doc in llama_parse_documents:
75
  f.write(doc.text + '\n')
76
 
 
36
  parsed_data = pickle.load(f)
37
  else:
38
  # Perform the parsing step and store the result in llama_parse_documents
39
+ parsingInstructiontest10k = """The provided document can be a brochure , textbook ,guide.
40
  It contains many images and tables.
41
  Try to be precise while answering the questions"""
42
  parser = LlamaParse(api_key=llamaparse_api_key, result_type="markdown", parsing_instruction=parsingInstructiontest10k)
 
70
  #with open('data/output.md', 'a') as f: # Open the file in append mode ('a')
71
  # for doc in llama_parse_documents:
72
  # f.write(doc.text + '\n')
73
+ with open(output_md, "a", encoding='utf-8') as f: # Open the file in append mode ('a')
74
  for doc in llama_parse_documents:
75
  f.write(doc.text + '\n')
76