Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -91,6 +91,7 @@ rag_chain = (retrieval # Step 1: Retrieve relevant document chunks based o
|
|
| 91 |
def get_rag_chain_response(user_question):
|
| 92 |
return rag_chain.invoke({"question": user_question})
|
| 93 |
|
|
|
|
| 94 |
def get_context_string_testing(user_question):
|
| 95 |
ret_arr = get_context_info(user_question)
|
| 96 |
context_str = ''
|
|
@@ -110,7 +111,7 @@ out_response = gradio.Textbox(type='text', label='Response to question')
|
|
| 110 |
|
| 111 |
# Gradio interface to generate UI link
|
| 112 |
iface = gradio.Interface( # YOUR CODE HERE
|
| 113 |
-
fn=
|
| 114 |
inputs=in_question,
|
| 115 |
outputs=out_response,
|
| 116 |
title="RAG implementation",
|
|
|
|
| 91 |
def get_rag_chain_response(user_question):
|
| 92 |
return rag_chain.invoke({"question": user_question})
|
| 93 |
|
| 94 |
+
#Below function is used only for testing. Otherwise it is not actually used
|
| 95 |
def get_context_string_testing(user_question):
|
| 96 |
ret_arr = get_context_info(user_question)
|
| 97 |
context_str = ''
|
|
|
|
| 111 |
|
| 112 |
# Gradio interface to generate UI link
|
| 113 |
iface = gradio.Interface( # YOUR CODE HERE
|
| 114 |
+
fn=get_rag_chain_response, #get_context_string_testing,
|
| 115 |
inputs=in_question,
|
| 116 |
outputs=out_response,
|
| 117 |
title="RAG implementation",
|