jungwoo3490 commited on
Commit
830c9df
ยท
1 Parent(s): d0e6593

edit app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -28,6 +28,7 @@ def get_pdf_text(pdf_docs):
28
  # ๊ณผ์ œ
29
  # ์•„๋ž˜ ํ…์ŠคํŠธ ์ถ”์ถœ ํ•จ์ˆ˜๋ฅผ ์ž‘์„ฑ
30
 
 
31
  def get_text_file(text_docs):
32
  temp_dir = tempfile.TemporaryDirectory()
33
  temp_filepath = os.path.join(temp_dir.name, text_docs.name)
@@ -53,7 +54,7 @@ def get_json_file(json_docs):
53
  temp_filepath = os.path.join(temp_dir.name, json_docs.name)
54
  with open(temp_filepath, "wb") as f:
55
  f.write(json_docs.getvalue())
56
- loader = JSONLoader(temp_filepath, jq_schema="info")
57
  json_doc = loader.load()
58
  return json_doc
59
 
 
28
  # ๊ณผ์ œ
29
  # ์•„๋ž˜ ํ…์ŠคํŠธ ์ถ”์ถœ ํ•จ์ˆ˜๋ฅผ ์ž‘์„ฑ
30
 
31
+
32
  def get_text_file(text_docs):
33
  temp_dir = tempfile.TemporaryDirectory()
34
  temp_filepath = os.path.join(temp_dir.name, text_docs.name)
 
54
  temp_filepath = os.path.join(temp_dir.name, json_docs.name)
55
  with open(temp_filepath, "wb") as f:
56
  f.write(json_docs.getvalue())
57
+ loader = JSONLoader(temp_filepath, jq_schema="worker")
58
  json_doc = loader.load()
59
  return json_doc
60