Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -165,6 +165,9 @@ sentence_vectors = st.session_state.sentence_vectors
|
|
165 |
|
166 |
description_text.text("่ชฌๆๆใฎๆๅณใ่ฟใใใใใใจใใ็ปๅใๆค็ดขใใพใใ\nใญใผใฏใผใใๅๆใใใใใใ่ช็ถใชๆ็ซ ใๅ
ฅๅใใๆนใ็ฒพๅบฆใใๆค็ดขใงใใพใใ")
|
167 |
|
|
|
|
|
|
|
168 |
prev_query = ""
|
169 |
query_input = st.text_input(label="่ชฌๆๆ", value="", on_change=clear_result)
|
170 |
|
@@ -174,9 +177,6 @@ search_buttion = st.button("ๆค็ดข")
|
|
174 |
|
175 |
result_text = st.empty()
|
176 |
|
177 |
-
def clear_result():
|
178 |
-
result_text.text("")
|
179 |
-
|
180 |
if search_buttion or prev_query != query_input:
|
181 |
query = normalize_text(query_input)
|
182 |
prev_query = query_input
|
|
|
165 |
|
166 |
description_text.text("่ชฌๆๆใฎๆๅณใ่ฟใใใใใใจใใ็ปๅใๆค็ดขใใพใใ\nใญใผใฏใผใใๅๆใใใใใใ่ช็ถใชๆ็ซ ใๅ
ฅๅใใๆนใ็ฒพๅบฆใใๆค็ดขใงใใพใใ")
|
167 |
|
168 |
+
def clear_result():
|
169 |
+
result_text.text("")
|
170 |
+
|
171 |
prev_query = ""
|
172 |
query_input = st.text_input(label="่ชฌๆๆ", value="", on_change=clear_result)
|
173 |
|
|
|
177 |
|
178 |
result_text = st.empty()
|
179 |
|
|
|
|
|
|
|
180 |
if search_buttion or prev_query != query_input:
|
181 |
query = normalize_text(query_input)
|
182 |
prev_query = query_input
|