Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -53,11 +53,12 @@ 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)
|
| 57 |
json_doc = json_loader.load()
|
| 58 |
return json_doc
|
| 59 |
|
| 60 |
|
|
|
|
| 61 |
# 문서들을 처리하여 텍스트 청크로 나누는 함수입니다.
|
| 62 |
def get_text_chunks(documents):
|
| 63 |
text_splitter = RecursiveCharacterTextSplitter(
|
|
|
|
| 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, jq_schema)
|
| 57 |
json_doc = json_loader.load()
|
| 58 |
return json_doc
|
| 59 |
|
| 60 |
|
| 61 |
+
|
| 62 |
# 문서들을 처리하여 텍스트 청크로 나누는 함수입니다.
|
| 63 |
def get_text_chunks(documents):
|
| 64 |
text_splitter = RecursiveCharacterTextSplitter(
|