tlsgy
commited on
Commit
Β·
cbe988a
1
Parent(s):
5d0a58f
dd
Browse files
app.py
CHANGED
@@ -53,8 +53,8 @@ def get_csv_file(docs):
|
|
53 |
def get_json_file(docs):
|
54 |
temp_dir = tempfile.TemporaryDirectory() # μμ λλ ν 리λ₯Ό μμ±ν©λλ€.
|
55 |
temp_filepath = os.path.join(temp_dir.name, docs.name) # μμ νμΌ κ²½λ‘λ₯Ό μμ±ν©λλ€.
|
56 |
-
|
57 |
-
|
58 |
|
59 |
loader = JSONLoader(file_path=temp_filepath,
|
60 |
jq_schema='.messages.[].content',
|
|
|
53 |
def get_json_file(docs):
|
54 |
temp_dir = tempfile.TemporaryDirectory() # μμ λλ ν 리λ₯Ό μμ±ν©λλ€.
|
55 |
temp_filepath = os.path.join(temp_dir.name, docs.name) # μμ νμΌ κ²½λ‘λ₯Ό μμ±ν©λλ€.
|
56 |
+
with open(temp_filepath, "wb") as f: # μμ νμΌμ λ°μ΄λ리 μ°κΈ° λͺ¨λλ‘ μ½λλ€.
|
57 |
+
f.write(docs.getvalue())
|
58 |
|
59 |
loader = JSONLoader(file_path=temp_filepath,
|
60 |
jq_schema='.messages.[].content',
|