Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -158,7 +158,7 @@ pyminizip.uncompress(
|
|
158 |
df = pq.read_table("irasuto_items_20210224.parquet").to_pandas()
|
159 |
sentence_vectors = np.stack(df["sentence_vector"])
|
160 |
|
161 |
-
description_text.text("
|
162 |
|
163 |
prev_query = ""
|
164 |
query_input = st.text_input(label="่ชฌๆๆ", value="")
|
@@ -168,8 +168,8 @@ closest_n = st.number_input(label="ๆค็ดขๆฐ", min_value=1, value=10, max_value=
|
|
168 |
search_buttion = st.button("ๆค็ดข")
|
169 |
|
170 |
if search_buttion or prev_query != query_input:
|
171 |
-
query = query_input
|
172 |
-
prev_query =
|
173 |
query_embedding = model.encode([query]).numpy()
|
174 |
|
175 |
distances = scipy.spatial.distance.cdist(
|
|
|
158 |
df = pq.read_table("irasuto_items_20210224.parquet").to_pandas()
|
159 |
sentence_vectors = np.stack(df["sentence_vector"])
|
160 |
|
161 |
+
description_text.text("่ชฌๆๆใฎๆๅณใ่ฟใใใใใใจใใ็ปๅใๆค็ดขใใพใใ\nใญใผใฏใผใใๅๆใใใใใใ่ช็ถใชๆ็ซ ใๅ
ฅๅใใๆนใ็ฒพๅบฆใใๆค็ดขใงใใพใใ")
|
162 |
|
163 |
prev_query = ""
|
164 |
query_input = st.text_input(label="่ชฌๆๆ", value="")
|
|
|
168 |
search_buttion = st.button("ๆค็ดข")
|
169 |
|
170 |
if search_buttion or prev_query != query_input:
|
171 |
+
query = normalize_text(query_input)
|
172 |
+
prev_query = query_input
|
173 |
query_embedding = model.encode([query]).numpy()
|
174 |
|
175 |
distances = scipy.spatial.distance.cdist(
|