JoSuBeen commited on
Commit
283bb14
ยท
1 Parent(s): d55c1c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -25,14 +25,17 @@ 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
  # ๋ฌธ์„œ๋“ค์„ ์ฒ˜๋ฆฌํ•˜์—ฌ ํ…์ŠคํŠธ ์ฒญํฌ๋กœ ๋‚˜๋ˆ„๋Š” ํ•จ์ˆ˜์ž…๋‹ˆ๋‹ค.
38
  def get_text_chunks(documents):
 
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
  def get_text_chunks(documents):