Update app.py
Browse files
app.py
CHANGED
@@ -50,13 +50,14 @@ def search_embeddings(query_text, output_option):
|
|
50 |
return md
|
51 |
elif output_option == "RAG-friendly":
|
52 |
hit_texts = [hit["text"] for hit in hits]
|
53 |
-
|
|
|
54 |
|
55 |
|
56 |
demo = gr.Interface(
|
57 |
fn=search_embeddings,
|
58 |
inputs=[gr.Textbox(label="enter your query", placeholder="Type Markdown here...", lines=10), gr.Radio(label="Select an output option", choices=output_options, value="RAG-friendly")],
|
59 |
-
outputs=gr.
|
60 |
title="HF Docs Emebddings Explorer",
|
61 |
allow_flagging="never"
|
62 |
)
|
|
|
50 |
return md
|
51 |
elif output_option == "RAG-friendly":
|
52 |
hit_texts = [hit["text"] for hit in hits]
|
53 |
+
hit_text_str = "\n------------\n".join(hit_texts)
|
54 |
+
return hit_text_str
|
55 |
|
56 |
|
57 |
demo = gr.Interface(
|
58 |
fn=search_embeddings,
|
59 |
inputs=[gr.Textbox(label="enter your query", placeholder="Type Markdown here...", lines=10), gr.Radio(label="Select an output option", choices=output_options, value="RAG-friendly")],
|
60 |
+
outputs=gr.Markdown(),
|
61 |
title="HF Docs Emebddings Explorer",
|
62 |
allow_flagging="never"
|
63 |
)
|