christopher commited on
Commit
8ceef3d
Β·
1 Parent(s): 2623e85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -2,7 +2,10 @@ import gradio as gr
2
  from faiss import IndexFlatIP
3
  import pandas as pd
4
  import numpy as np
 
5
 
 
 
6
  input_embeddings = np.load("bert_input_embeddings.npy")
7
  index = IndexFlatIP(input_embeddings.shape[-1])
8
  index.add(input_embeddings)
 
2
  from faiss import IndexFlatIP
3
  import pandas as pd
4
  import numpy as np
5
+ from transformers import AutoTokenizer
6
 
7
+
8
+ tokenizer = AutoTokenizer.from_pretrained("bert-large-uncased")
9
  input_embeddings = np.load("bert_input_embeddings.npy")
10
  index = IndexFlatIP(input_embeddings.shape[-1])
11
  index.add(input_embeddings)