Spaces:
Build error
Build error
Deploy chatbot update
Browse files
app.py
CHANGED
|
@@ -25,7 +25,7 @@ llm = HuggingFaceEndpoint(
|
|
| 25 |
# 3. ๋์ ๋ฐ์ดํฐ์
Repo ์ ๋ณด
|
| 26 |
dataset_repo = "dgmos/ericsson-manuals"
|
| 27 |
|
| 28 |
-
# 4. ์ฒ๋ฆฌํ PDF ํ์ผ ๋ฆฌ์คํธ
|
| 29 |
pdf_files = [
|
| 30 |
"(20220324) L2 Switch ์ด์ฉ ๋งค๋ด์ผ_Innovation TF_Ver3.1_OCR.pdf",
|
| 31 |
"(20230504) 23๋
๊ธฐ์ ๊ต์ก ๊ต์ฌ 1 (LTE)_๊ฐ์นํ์ ํ_OCR.pdf",
|
|
@@ -79,8 +79,7 @@ for fname in pdf_files:
|
|
| 79 |
content = page.extract_text()
|
| 80 |
if content:
|
| 81 |
texts.append(content)
|
| 82 |
-
text = "
|
| 83 |
-
".join(texts).strip()
|
| 84 |
if text:
|
| 85 |
docs.append({"page_content": text, "metadata": {"source": fname}})
|
| 86 |
else:
|
|
|
|
| 25 |
# 3. ๋์ ๋ฐ์ดํฐ์
Repo ์ ๋ณด
|
| 26 |
dataset_repo = "dgmos/ericsson-manuals"
|
| 27 |
|
| 28 |
+
# 4. ์ฒ๋ฆฌํ PDF ํ์ผ ๋ฆฌ์คํธ
|
| 29 |
pdf_files = [
|
| 30 |
"(20220324) L2 Switch ์ด์ฉ ๋งค๋ด์ผ_Innovation TF_Ver3.1_OCR.pdf",
|
| 31 |
"(20230504) 23๋
๊ธฐ์ ๊ต์ก ๊ต์ฌ 1 (LTE)_๊ฐ์นํ์ ํ_OCR.pdf",
|
|
|
|
| 79 |
content = page.extract_text()
|
| 80 |
if content:
|
| 81 |
texts.append(content)
|
| 82 |
+
text = "\n".join(texts).strip() # ์ค๋ฐ๊ฟ ์ด์ค์ผ์ดํ ์ฒ๋ฆฌ โ ์ ๋ ์๋ ์ค๋ฐ๊ฟ ์ ์๊น
|
|
|
|
| 83 |
if text:
|
| 84 |
docs.append({"page_content": text, "metadata": {"source": fname}})
|
| 85 |
else:
|