mishig HF staff commited on
Commit
be701db
1 Parent(s): 9d56f47

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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
- return hit_texts
 
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.Textbox(placeholder="Results will appear here...", label="Search Results"),
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
  )