raynardj commited on
Commit
cfa2da9
1 Parent(s): 49d446e

load from encoded

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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 = encoder.encode(all_lines, batch_size=64, show_progress_bar=True)
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