timmy0079 commited on
Commit
a9cb65d
1 Parent(s): a8994a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -54,8 +54,8 @@ def get_csv_file(csv_docs):
54
  def get_json_file(json_docs):
55
  temp_dir = tempfile.TemporaryDirectory()
56
  temp_filepath = os.path.join(temp_dir.name, json_docs.name)
57
- with open(temp_filepath, "w", encoding="utf-8") as f:
58
- f.write(str(json_docs.getvalue()))
59
  json_loader = JSONLoader(
60
  file_path=temp_filepath,
61
  jq_schema='.messages[].content',
 
54
  def get_json_file(json_docs):
55
  temp_dir = tempfile.TemporaryDirectory()
56
  temp_filepath = os.path.join(temp_dir.name, json_docs.name)
57
+ with open(temp_filepath, "wb") as f:
58
+ f.write(json_docs.getvalue())
59
  json_loader = JSONLoader(
60
  file_path=temp_filepath,
61
  jq_schema='.messages[].content',