Spaces:
Runtime error
Runtime error
reverting old changes
Browse files
app.py
CHANGED
@@ -43,7 +43,6 @@ index = load_index()
|
|
43 |
|
44 |
|
45 |
def predict(text: str = sample_text, top_k: int=3):
|
46 |
-
text = text + "".join(['[PAD]'] * 252)
|
47 |
index_data, faiss_index = index
|
48 |
# takes only the [CLS] embedding (for now)
|
49 |
query = model(text, return_tensors='pt')[0][0].numpy().reshape(1, -1)
|
|
|
43 |
|
44 |
|
45 |
def predict(text: str = sample_text, top_k: int=3):
|
|
|
46 |
index_data, faiss_index = index
|
47 |
# takes only the [CLS] embedding (for now)
|
48 |
query = model(text, return_tensors='pt')[0][0].numpy().reshape(1, -1)
|