FridayMaster commited on
Commit
796b144
·
verified ·
1 Parent(s): 0bdc9aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -9,13 +9,13 @@ import nltk
9
  # Download the required NLTK data
10
  nltk.download('punkt')
11
 
 
12
  # Load the Ubuntu manual from a .txt file
13
  try:
14
- # Load the Ubuntu manual from a .txt file
15
- with open("ubuntu_manual.txt", "r", encoding="utf-8") as file:
16
- full_text = file.read()
17
  except FileNotFoundError:
18
- raise FileNotFoundError("The file /content/ubuntu_manual.txt was not found.")
19
 
20
  # Function to chunk the text into smaller pieces
21
  def chunk_text(text, chunk_size=500): # Larger chunks
 
9
  # Download the required NLTK data
10
  nltk.download('punkt')
11
 
12
+
13
  # Load the Ubuntu manual from a .txt file
14
  try:
15
+ with open("ubuntu_manual.txt", "r", encoding="utf-8") as file:
16
+ full_text = file.read()
 
17
  except FileNotFoundError:
18
+ raise FileNotFoundError("The file ubuntu_manual.txt was not found.")
19
 
20
  # Function to chunk the text into smaller pieces
21
  def chunk_text(text, chunk_size=500): # Larger chunks