Sawon2023 commited on
Commit
1997c8f
1 Parent(s): 38b91e9

Updated pdf parsing

Browse files
Files changed (1) hide show
  1. pdftoqa_generator.py +1 -1
pdftoqa_generator.py CHANGED
@@ -17,7 +17,7 @@ from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
17
  os.environ["OPENAI_API_KEY"] = "sk-"
18
 
19
 
20
- def pdf_parser(file_path):
21
  bytes_data = uploaded_file.read()
22
  with NamedTemporaryFile(delete=False) as tmp: # open a named temporary file
23
  tmp.write(bytes_data) # Write data from the uploaded file into it
 
17
  os.environ["OPENAI_API_KEY"] = "sk-"
18
 
19
 
20
+ def pdf_parser(uploaded_file):
21
  bytes_data = uploaded_file.read()
22
  with NamedTemporaryFile(delete=False) as tmp: # open a named temporary file
23
  tmp.write(bytes_data) # Write data from the uploaded file into it