Spaces:
Runtime error
Runtime error
Commit
·
41bfc56
1
Parent(s):
79f5ce5
Update app.py
Browse files
app.py
CHANGED
@@ -1,15 +1,8 @@
|
|
1 |
-
# from langchain.document_loaders import UnstructuredPDFLoader
|
2 |
|
3 |
-
def extract_text_from_pdf(file):
|
4 |
-
# loader = UnstructuredPDFLoader(file)
|
5 |
-
# data = loader.load_and_split()
|
6 |
-
return 'data'
|
7 |
-
|
8 |
-
# langchain unstructured unstructured[pdf]
|
9 |
|
10 |
st.title("PDF Text Extractor")
|
11 |
uploaded_file = st.file_uploader("Upload a PDF file", type=["pdf"])
|
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)
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
st.title("PDF Text Extractor")
|
4 |
uploaded_file = st.file_uploader("Upload a PDF file", type=["pdf"])
|
5 |
if uploaded_file is not None:
|
6 |
st.subheader("PDF Content:")
|
7 |
+
text_content = 'extract_text_from_pdf(uploaded_file)'
|
8 |
st.text(text_content)
|