Spaces:
Sleeping
Sleeping
update
Browse files
app.py
CHANGED
@@ -41,7 +41,6 @@ def load_title_embeddings():
|
|
41 |
return title_embeddings
|
42 |
|
43 |
|
44 |
-
@st.cache_data
|
45 |
def get_retrieval_results(index, input_text, top_k, tokenizer, title_df):
|
46 |
batch_dict = tokenizer(f"query: {input_text}", max_length=512, padding=True, truncation=True, return_tensors='pt')
|
47 |
with torch.no_grad():
|
@@ -70,8 +69,8 @@ if __name__ == "__main__":
|
|
70 |
index = faiss.IndexFlatL2(1024)
|
71 |
index.add(title_embeddings)
|
72 |
|
73 |
-
st.markdown("## NLP2024
|
74 |
-
input_text = st.text_input('
|
75 |
top_k = st.number_input('top_k', min_value=1, value=10, step=1)
|
76 |
|
77 |
if st.button('検索'):
|
|
|
41 |
return title_embeddings
|
42 |
|
43 |
|
|
|
44 |
def get_retrieval_results(index, input_text, top_k, tokenizer, title_df):
|
45 |
batch_dict = tokenizer(f"query: {input_text}", max_length=512, padding=True, truncation=True, return_tensors='pt')
|
46 |
with torch.no_grad():
|
|
|
69 |
index = faiss.IndexFlatL2(1024)
|
70 |
index.add(title_embeddings)
|
71 |
|
72 |
+
st.markdown("## NLP2024 論文検索")
|
73 |
+
input_text = st.text_input('query', '', placeholder='')
|
74 |
top_k = st.number_input('top_k', min_value=1, value=10, step=1)
|
75 |
|
76 |
if st.button('検索'):
|