davidberenstein1957 HF staff commited on
Commit
73b4cd1
·
verified ·
1 Parent(s): 5555c7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -34,7 +34,7 @@ def rag_pipeline(query: str, k_retrieved: int = 10, k_reranked: int = 5):
34
  query_with_context = (
35
  f"Context: {documents['chunk'].to_list()[:k_reranked]}\n\nQuery: {query}"
36
  )
37
- return generate_response_api(query_with_context), documents
38
 
39
 
40
  with gr.Blocks() as demo:
@@ -70,7 +70,7 @@ with gr.Blocks() as demo:
70
  )
71
 
72
  submit_btn.click(
73
- fn=rag_interface,
74
  inputs=[query_input, retrieve_slider, rerank_slider],
75
  outputs=[response_output, documents_output],
76
  )
 
34
  query_with_context = (
35
  f"Context: {documents['chunk'].to_list()[:k_reranked]}\n\nQuery: {query}"
36
  )
37
+ return generate_response_api(query_with_context).content, documents
38
 
39
 
40
  with gr.Blocks() as demo:
 
70
  )
71
 
72
  submit_btn.click(
73
+ fn=rag_pipeline,
74
  inputs=[query_input, retrieve_slider, rerank_slider],
75
  outputs=[response_output, documents_output],
76
  )