Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -61,6 +61,24 @@ def get_text_from_json_file(doc_path):
|
|
61 |
text = json.dumps(data, indent=2)
|
62 |
return text
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
# λ¬Έμλ€μ μ²λ¦¬νμ¬ ν
μ€νΈ μ²ν¬λ‘ λλλ ν¨μμ
λλ€.
|
66 |
def get_text_chunks(documents):
|
|
|
61 |
text = json.dumps(data, indent=2)
|
62 |
return text
|
63 |
|
64 |
+
def get_text_file(docs):
|
65 |
+
text_list = []
|
66 |
+
for doc in docs:
|
67 |
+
text_list.append(get_text_from_text_file(doc))
|
68 |
+
return text_list
|
69 |
+
|
70 |
+
def get_csv_file(docs):
|
71 |
+
text_list = []
|
72 |
+
for doc in docs:
|
73 |
+
text_list.append(get_text_from_csv_file(doc))
|
74 |
+
return text_list
|
75 |
+
|
76 |
+
def get_json_file(docs):
|
77 |
+
text_list = []
|
78 |
+
for doc in docs:
|
79 |
+
text_list.append(get_text_from_json_file(doc))
|
80 |
+
return text_list
|
81 |
+
|
82 |
|
83 |
# λ¬Έμλ€μ μ²λ¦¬νμ¬ ν
μ€νΈ μ²ν¬λ‘ λλλ ν¨μμ
λλ€.
|
84 |
def get_text_chunks(documents):
|