Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -18,16 +18,16 @@ embeddings = HuggingFaceEmbeddings(
|
|
18 |
db = FAISS.from_texts(sample_words, embeddings)
|
19 |
|
20 |
# UI
|
|
|
21 |
st.header("Ask me a question, and I'll provide similar words!")
|
22 |
|
23 |
input_word = st.text_input("You: ", key= input)
|
24 |
|
25 |
-
|
26 |
-
submit = st.button('Show me similar words')
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
|
|
|
18 |
db = FAISS.from_texts(sample_words, embeddings)
|
19 |
|
20 |
# UI
|
21 |
+
st.title('Similar Word Searching App')
|
22 |
st.header("Ask me a question, and I'll provide similar words!")
|
23 |
|
24 |
input_word = st.text_input("You: ", key= input)
|
25 |
|
26 |
+
submit = st.button('Show me similar words')
|
|
|
27 |
|
28 |
+
if submit:
|
29 |
+
results = db.similarity_search(input_word)
|
30 |
+
st.subheader("Top Words:")
|
31 |
+
st.text(results[0].page_content)
|
32 |
+
st.text(results[1].page_content)
|
33 |
|