Spaces:
Runtime error
Runtime error
update
Browse files
app.py
CHANGED
@@ -21,14 +21,14 @@ def load_model_and_tokenizer():
|
|
21 |
|
22 |
@st.cache(allow_output_mutation=True)
|
23 |
def load_sentence_data():
|
24 |
-
sentence_df = pd.read_csv("
|
25 |
|
26 |
return sentence_df
|
27 |
|
28 |
|
29 |
@st.cache(allow_output_mutation=True)
|
30 |
def load_sentence_embeddings_and_index():
|
31 |
-
npz_comp = np.load("
|
32 |
sentence_embeddings = npz_comp["arr_0"]
|
33 |
|
34 |
faiss.normalize_L2(sentence_embeddings)
|
@@ -102,7 +102,7 @@ if __name__ == "__main__":
|
|
102 |
st.markdown("## AI-based Paraphrasing for Academic Writing")
|
103 |
|
104 |
input_text = st.text_area("text input", "We saw difference in the results between A and B.", placeholder="Write something here...")
|
105 |
-
top_k = st.number_input('top_k (upperbound)', min_value=1, value=
|
106 |
input_words = st.text_input("exclude words (comma separated)", "see, saw")
|
107 |
|
108 |
if st.button('search'):
|
|
|
21 |
|
22 |
@st.cache(allow_output_mutation=True)
|
23 |
def load_sentence_data():
|
24 |
+
sentence_df = pd.read_csv("sentence_data_2m.csv.gz")
|
25 |
|
26 |
return sentence_df
|
27 |
|
28 |
|
29 |
@st.cache(allow_output_mutation=True)
|
30 |
def load_sentence_embeddings_and_index():
|
31 |
+
npz_comp = np.load("sentence_embeddings_2m.npz")
|
32 |
sentence_embeddings = npz_comp["arr_0"]
|
33 |
|
34 |
faiss.normalize_L2(sentence_embeddings)
|
|
|
102 |
st.markdown("## AI-based Paraphrasing for Academic Writing")
|
103 |
|
104 |
input_text = st.text_area("text input", "We saw difference in the results between A and B.", placeholder="Write something here...")
|
105 |
+
top_k = st.number_input('top_k (upperbound)', min_value=1, value=100, step=1)
|
106 |
input_words = st.text_input("exclude words (comma separated)", "see, saw")
|
107 |
|
108 |
if st.button('search'):
|
sentence_data_789k.csv.gz β sentence_data_2m.csv.gz
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:63c969cf0690e217d708cf1dca54a567b3e8b32c4d1b4f8581445a5bd3a5be0a
|
3 |
+
size 105386557
|
sentence_embeddings_789k.npz β sentence_embeddings_2m.npz
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fe2c1296e1d676df6c0fc24b748523e254222ccf19bf5116d2cca0d93237709e
|
3 |
+
size 6219635550
|