nijoow commited on
Commit
6934747
ยท
1 Parent(s): 53e1a80

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -28,9 +28,15 @@ def get_pdf_text(pdf_docs):
28
  # ๊ณผ์ œ
29
  # ์•„๋ž˜ ํ…์ŠคํŠธ ์ถ”์ถœ ํ•จ์ˆ˜๋ฅผ ์ž‘์„ฑ
30
  def get_text_file(docs):
31
- text_content = docs.getvalue().decode('utf-8')
32
- return text_content
33
 
 
 
 
 
 
 
 
34
 
35
  import csv
36
  import json
 
28
  # ๊ณผ์ œ
29
  # ์•„๋ž˜ ํ…์ŠคํŠธ ์ถ”์ถœ ํ•จ์ˆ˜๋ฅผ ์ž‘์„ฑ
30
  def get_text_file(docs):
31
+ text_content = ""
 
32
 
33
+ # Hugging Face ๋ชจ๋ธ์„ ๋กœ๋“œํ•ฉ๋‹ˆ๋‹ค. (์˜ˆ์‹œ๋กœ 'bert-base-uncased' ๋ชจ๋ธ์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค)
34
+ model_name = 'bert-base-uncased'
35
+ model = HuggingFaceEmbeddings(model_name)
36
+
37
+ # ํ…์ŠคํŠธ ์ถ”์ถœ์„ ์œ„ํ•ด ๋ฌธ์„œ๋ฅผ ๋กœ๋“œํ•ฉ๋‹ˆ๋‹ค.
38
+ text_loader = TextLoader(docs.getvalue().decode('utf-8'))
39
+ document = text_loader.load()
40
 
41
  import csv
42
  import json