rvritesh167 commited on
Commit
12e6f31
·
1 Parent(s): e0c3dae

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from langchain.document_loaders import UnstructuredPDFLoader
2
+
3
+ def extract_text_from_pdf():
4
+ loader = UnstructuredPDFLoader("")
5
+ data = loader.load_and_split()
6
+ return data
7
+
8
+ st.title("PDF Text Extractor")
9
+
10
+ uploaded_file = st.file_uploader("Upload a PDF file", type=["pdf"])
11
+
12
+ if uploaded_file is not None:
13
+ st.subheader("PDF Content:")
14
+ text_content = extract_text_from_pdf(uploaded_file)
15
+ st.text(text_content)