Moonjunho commited on
Commit
8782caf
·
1 Parent(s): 42e48fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -34,7 +34,7 @@ def get_json_file(docs):
34
  temp_dir = tempfile.TemporaryDirectory()
35
  temp_filepath = os.path.join(temp_dir.name, pdf_docs.name)
36
  with open(temp_filepath, "wb") as f:
37
- f.write(pdf_docs.getvalue())
38
 
39
 
40
  loader = JSONLoader(
@@ -42,8 +42,8 @@ def get_json_file(docs):
42
  jq_schema='.messages[].content',
43
  text_content=False)
44
 
45
- data = loader.load()
46
- return data
47
 
48
 
49
 
 
34
  temp_dir = tempfile.TemporaryDirectory()
35
  temp_filepath = os.path.join(temp_dir.name, pdf_docs.name)
36
  with open(temp_filepath, "wb") as f:
37
+ f.write(json_docs.getvalue())
38
 
39
 
40
  loader = JSONLoader(
 
42
  jq_schema='.messages[].content',
43
  text_content=False)
44
 
45
+ json_docs = loader.load()
46
+ return json_docs
47
 
48
 
49