nijoow commited on
Commit
e2a574c
Β·
1 Parent(s): 66b40e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
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):