JoSuBeen commited on
Commit
33c7a16
β€’
1 Parent(s): d55c1c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -25,13 +25,18 @@ def get_pdf_text(pdf_docs):
25
  # 과제
26
  # μ•„λž˜ ν…μŠ€νŠΈ μΆ”μΆœ ν•¨μˆ˜λ₯Ό μž‘μ„±
27
  def get_text_file(docs):
28
- pass
29
-
30
  def get_csv_file(docs):
31
- pass
 
 
32
 
33
  def get_json_file(docs):
34
- pass
 
 
 
35
 
36
 
37
  # λ¬Έμ„œλ“€μ„ μ²˜λ¦¬ν•˜μ—¬ ν…μŠ€νŠΈ 청크둜 λ‚˜λˆ„λŠ” ν•¨μˆ˜μž…λ‹ˆλ‹€.
 
25
  # 과제
26
  # μ•„λž˜ ν…μŠ€νŠΈ μΆ”μΆœ ν•¨μˆ˜λ₯Ό μž‘μ„±
27
  def get_text_file(docs):
28
+ return [docs.getvalue()] # Return a list with the entire text content as a single element.
29
+
30
  def get_csv_file(docs):
31
+ csv_loader = CSVLoader(docs.name) # Assuming CSVLoader takes a file path.
32
+ csv_doc = csv_loader.load()
33
+ return csv_doc # Return the content of the CSV document.
34
 
35
  def get_json_file(docs):
36
+ json_loader = JSONLoader(docs.name) # Assuming JSONLoader takes a file path.
37
+ json_doc = json_loader.load()
38
+ return json_doc # Return the content of the JSON document.
39
+
40
 
41
 
42
  # λ¬Έμ„œλ“€μ„ μ²˜λ¦¬ν•˜μ—¬ ν…μŠ€νŠΈ 청크둜 λ‚˜λˆ„λŠ” ν•¨μˆ˜μž…λ‹ˆλ‹€.