Spaces:
Sleeping
Sleeping
link to mom_phrases.txt
Browse files
app.py
CHANGED
@@ -7,12 +7,12 @@ import torch
|
|
7 |
|
8 |
# STEP 2 FROM SEMANTIC SEARCH
|
9 |
# Open the water_cycle.txt file in read mode with UTF-8 encoding
|
10 |
-
with open("
|
11 |
# Read the entire contents of the file and store it in a variable
|
12 |
-
|
13 |
|
14 |
# Print the text below
|
15 |
-
print(
|
16 |
|
17 |
|
18 |
# STEP 3 FROM SEMANTIC SEARCH
|
@@ -43,7 +43,7 @@ def preprocess_text(text):
|
|
43 |
return cleaned_chunks
|
44 |
|
45 |
# Call the preprocess_text function and store the result in a cleaned_chunks variable
|
46 |
-
cleaned_chunks = preprocess_text(
|
47 |
|
48 |
#STEP 4 FROM SEMANTIC SEARCH
|
49 |
# Load the pre-trained embedding model that converts text to vectors
|
|
|
7 |
|
8 |
# STEP 2 FROM SEMANTIC SEARCH
|
9 |
# Open the water_cycle.txt file in read mode with UTF-8 encoding
|
10 |
+
with open("mom_phrases.txt", "r", encoding="utf-8") as file:
|
11 |
# Read the entire contents of the file and store it in a variable
|
12 |
+
phrases_text = file.read()
|
13 |
|
14 |
# Print the text below
|
15 |
+
print(phrases_text)
|
16 |
|
17 |
|
18 |
# STEP 3 FROM SEMANTIC SEARCH
|
|
|
43 |
return cleaned_chunks
|
44 |
|
45 |
# Call the preprocess_text function and store the result in a cleaned_chunks variable
|
46 |
+
cleaned_chunks = preprocess_text(phrases_text) # Complete this line
|
47 |
|
48 |
#STEP 4 FROM SEMANTIC SEARCH
|
49 |
# Load the pre-trained embedding model that converts text to vectors
|