Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -258,7 +258,7 @@ def create_gradio_interface(rag_system: AdvancedRAGSystem) -> gr.Blocks:
|
|
258 |
pass
|
259 |
|
260 |
def update_history(question: str):
|
261 |
-
return f"Last context used ({
|
262 |
|
263 |
with gr.Blocks(title="Advanced RAG System") as demo:
|
264 |
gr.Markdown("# Advanced RAG System with PDF Processing")
|
@@ -322,7 +322,7 @@ def create_gradio_interface(rag_system: AdvancedRAGSystem) -> gr.Blocks:
|
|
322 |
|
323 |
query_button.click(
|
324 |
fn=update_history,
|
325 |
-
inputs=[],
|
326 |
outputs=[history_output]
|
327 |
)
|
328 |
|
|
|
258 |
pass
|
259 |
|
260 |
def update_history(question: str):
|
261 |
+
return f"Last context used ({rag_system.source_documents} documents):\n\n{rag_system.context}"
|
262 |
|
263 |
with gr.Blocks(title="Advanced RAG System") as demo:
|
264 |
gr.Markdown("# Advanced RAG System with PDF Processing")
|
|
|
322 |
|
323 |
query_button.click(
|
324 |
fn=update_history,
|
325 |
+
inputs=[question_input],
|
326 |
outputs=[history_output]
|
327 |
)
|
328 |
|