Spaces:
Sleeping
Sleeping
pratikshahp
commited on
Commit
•
3384bd4
1
Parent(s):
7e0f5a7
Update app.py
Browse files
app.py
CHANGED
@@ -7,10 +7,6 @@ from langchain.text_splitter import RecursiveCharacterTextSplitter
|
|
7 |
from langchain.chains.combine_documents import create_stuff_documents_chain
|
8 |
from langchain_core.prompts import ChatPromptTemplate
|
9 |
from langchain.chains import create_retrieval_chain
|
10 |
-
import logging
|
11 |
-
|
12 |
-
# Set up logging
|
13 |
-
logging.basicConfig(level=logging.INFO)
|
14 |
|
15 |
st.title("PDF Question Answering with LangChain")
|
16 |
|
@@ -72,7 +68,6 @@ if uploaded_file:
|
|
72 |
|
73 |
except Exception as e:
|
74 |
st.error(f"Error: {e}")
|
75 |
-
logging.error(f"An error occurred: {e}", exc_info=True)
|
76 |
# Print or log detailed error information for debugging
|
77 |
st.exception(e)
|
78 |
|
|
|
7 |
from langchain.chains.combine_documents import create_stuff_documents_chain
|
8 |
from langchain_core.prompts import ChatPromptTemplate
|
9 |
from langchain.chains import create_retrieval_chain
|
|
|
|
|
|
|
|
|
10 |
|
11 |
st.title("PDF Question Answering with LangChain")
|
12 |
|
|
|
68 |
|
69 |
except Exception as e:
|
70 |
st.error(f"Error: {e}")
|
|
|
71 |
# Print or log detailed error information for debugging
|
72 |
st.exception(e)
|
73 |
|