minji1115 commited on
Commit
79eab9e
·
1 Parent(s): 3269a35

wb로 변경

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -44,7 +44,7 @@ def get_csv_file(csv_docs):
44
  temp_filepath = os.path.join(temp_dir.name, csv_docs.name)
45
  with open(temp_filepath, "wb") as f:
46
  f.write(csv_docs.getvalue())
47
- csv_loader = CSVLoader(temp_filepath)
48
  csv_doc = csv_loader.load()
49
  return csv_doc
50
 
@@ -53,7 +53,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
- json_loader = JSONLoader(temp_filepath, '.messages[].content', False)
57
  json_doc = json_loader.load()
58
  return json_doc
59
 
 
44
  temp_filepath = os.path.join(temp_dir.name, csv_docs.name)
45
  with open(temp_filepath, "wb") as f:
46
  f.write(csv_docs.getvalue())
47
+ csv_loader = CSVLoader(file_path = temp_filepath)
48
  csv_doc = csv_loader.load()
49
  return csv_doc
50
 
 
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
+ json_loader = JSONLoader(file_path = temp_filepath, jq_schema = '.messages[].content', text_content = False)
57
  json_doc = json_loader.load()
58
  return json_doc
59