Spaces:
Runtime error
Runtime error
Updated pdf parsing
Browse files- 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(
|
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
|