load from encoded
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ all_lines = load_book()
|
|
44 |
@st.cache(allow_output_mutation=True)
|
45 |
def encode_book():
|
46 |
with st.spinner(f"Encoding sentences for book《Records of the Grand Historian》"):
|
47 |
-
vec =
|
48 |
cosine = CosineSearch(vec)
|
49 |
return cosine
|
50 |
|
|
|
44 |
@st.cache(allow_output_mutation=True)
|
45 |
def encode_book():
|
46 |
with st.spinner(f"Encoding sentences for book《Records of the Grand Historian》"):
|
47 |
+
vec = np.load('vec.npy')
|
48 |
cosine = CosineSearch(vec)
|
49 |
return cosine
|
50 |
|