Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def run_chatbot():
|
|
27 |
user_input = st.text_area("Siz: ")
|
28 |
if user_input:
|
29 |
# En yakın eşleşmeyi bul
|
30 |
-
closest_match = get_close_matches(user_input.lower(), chatbot._pairs
|
31 |
if closest_match:
|
32 |
response = chatbot.respond(closest_match[0])
|
33 |
st.write("ChatBot: " + response)
|
|
|
27 |
user_input = st.text_area("Siz: ")
|
28 |
if user_input:
|
29 |
# En yakın eşleşmeyi bul
|
30 |
+
closest_match = get_close_matches(user_input.lower(), [pattern for pattern, _ in chatbot._pairs], n=1, cutoff=0.6)
|
31 |
if closest_match:
|
32 |
response = chatbot.respond(closest_match[0])
|
33 |
st.write("ChatBot: " + response)
|