Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,10 +10,10 @@ import nltk
|
|
10 |
nltk.download('punkt')
|
11 |
nltk.download('punkt_tab')
|
12 |
|
13 |
-
|
14 |
# Load the Ubuntu manual from a .txt file
|
15 |
try:
|
16 |
-
|
17 |
full_text = file.read()
|
18 |
except FileNotFoundError:
|
19 |
raise FileNotFoundError("The file ubuntu_manual.txt was not found.")
|
|
|
10 |
nltk.download('punkt')
|
11 |
nltk.download('punkt_tab')
|
12 |
|
13 |
+
faiss_path="ubuntu_manual.txt"
|
14 |
# Load the Ubuntu manual from a .txt file
|
15 |
try:
|
16 |
+
with open(faiss_path, "r", encoding="utf-8") as file:
|
17 |
full_text = file.read()
|
18 |
except FileNotFoundError:
|
19 |
raise FileNotFoundError("The file ubuntu_manual.txt was not found.")
|