Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -28,9 +28,15 @@ def get_pdf_text(pdf_docs):
|
|
28 |
# ๊ณผ์
|
29 |
# ์๋ ํ
์คํธ ์ถ์ถ ํจ์๋ฅผ ์์ฑ
|
30 |
def get_text_file(docs):
|
31 |
-
text_content =
|
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
|