Spaces:
Sleeping
Sleeping
Update Gradio_UI.py
Browse files- Gradio_UI.py +1 -1
Gradio_UI.py
CHANGED
|
@@ -27,7 +27,7 @@ class GradioUI:
|
|
| 27 |
# The document_qna_tool expects a file path string.
|
| 28 |
print("Detected PDF upload and query. Calling document_qna_tool...")
|
| 29 |
# The tool signature is document_qna_tool(pdf_path: str, question: str)
|
| 30 |
-
response = self.agent.tools[
|
| 31 |
print("Document Q&A tool finished.")
|
| 32 |
# Optional: Clean up the uploaded file after processing
|
| 33 |
# import os
|
|
|
|
| 27 |
# The document_qna_tool expects a file path string.
|
| 28 |
print("Detected PDF upload and query. Calling document_qna_tool...")
|
| 29 |
# The tool signature is document_qna_tool(pdf_path: str, question: str)
|
| 30 |
+
response = self.agent.tools["document_qna_tool"](pdf_file.name, query)
|
| 31 |
print("Document Q&A tool finished.")
|
| 32 |
# Optional: Clean up the uploaded file after processing
|
| 33 |
# import os
|