Mniej kontekstu. Zmniejszyłem z 3 do 1.
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ with open('vector_map.pkl', 'rb') as f:
|
|
27 |
|
28 |
# Przykładowe wyszukiwanie
|
29 |
def szukaj(query_text, history):
|
30 |
-
top_n_results = find_similar(query_text, vector_map, model, top_n=
|
31 |
context=''
|
32 |
for text, similarity in top_n_results:
|
33 |
context=context+text
|
@@ -46,7 +46,7 @@ def szukaj(query_text, history):
|
|
46 |
demo=gr.ChatInterface(
|
47 |
fn=szukaj,
|
48 |
theme=gr.themes.Glass(font='OpenSans'),
|
49 |
-
|
50 |
title='JaCzat',
|
51 |
description='Tu możesz zapytać o wszystko dotyczące cyfrowej dostępności, w tym przede wszystkim WCAG.',
|
52 |
submit_btn='Zapytaj',
|
|
|
27 |
|
28 |
# Przykładowe wyszukiwanie
|
29 |
def szukaj(query_text, history):
|
30 |
+
top_n_results = find_similar(query_text, vector_map, model, top_n=1)
|
31 |
context=''
|
32 |
for text, similarity in top_n_results:
|
33 |
context=context+text
|
|
|
46 |
demo=gr.ChatInterface(
|
47 |
fn=szukaj,
|
48 |
theme=gr.themes.Glass(font='OpenSans'),
|
49 |
+
autofocus=True,
|
50 |
title='JaCzat',
|
51 |
description='Tu możesz zapytać o wszystko dotyczące cyfrowej dostępności, w tym przede wszystkim WCAG.',
|
52 |
submit_btn='Zapytaj',
|