Update app.py
Browse files
app.py
CHANGED
@@ -43,7 +43,7 @@ def find(question):
|
|
43 |
question_embedding = get_embeddings([question]).cpu().detach().numpy()
|
44 |
|
45 |
scores, samples = embeddings_dataset.get_nearest_examples(
|
46 |
-
"embeddings", question_embedding, k=
|
47 |
)
|
48 |
|
49 |
samples_df = pd.DataFrame.from_dict(samples)
|
@@ -59,7 +59,7 @@ demo = gr.Blocks()
|
|
59 |
with demo:
|
60 |
inp = gr.Textbox(placeholder="Enter prompt",label= "Prompt like: 'how to export to PDF?', 'What is Stimulsoft Reports?', 'What is Dashboards?', 'how to render report?', 'List of exports'" )
|
61 |
find_btn = gr.Button("Find")
|
62 |
-
big_block = [gr.HTML("") for i in range(
|
63 |
|
64 |
find_btn.click(find,
|
65 |
inputs=inp,
|
|
|
43 |
question_embedding = get_embeddings([question]).cpu().detach().numpy()
|
44 |
|
45 |
scores, samples = embeddings_dataset.get_nearest_examples(
|
46 |
+
"embeddings", question_embedding, k=10
|
47 |
)
|
48 |
|
49 |
samples_df = pd.DataFrame.from_dict(samples)
|
|
|
59 |
with demo:
|
60 |
inp = gr.Textbox(placeholder="Enter prompt",label= "Prompt like: 'how to export to PDF?', 'What is Stimulsoft Reports?', 'What is Dashboards?', 'how to render report?', 'List of exports'" )
|
61 |
find_btn = gr.Button("Find")
|
62 |
+
big_block = [gr.HTML("") for i in range(10)]
|
63 |
|
64 |
find_btn.click(find,
|
65 |
inputs=inp,
|