Skip to content

Commit

Permalink
add debugging messages, import os
Browse files Browse the repository at this point in the history
  • Loading branch information
salgadev committed Apr 18, 2024
1 parent 2e3cdd3 commit 80d18e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import streamlit as st
import io
import os
import tempfile

from scripts import generate_metadata, ingest


st.title('PDF to Text Converter')
st.write('This app converts a PDF file to plain text.')
st.title('DocVerifyRAG')
st.write('Anomaly detection for BIM document metadata')

uploaded_file = st.file_uploader("Choose a PDF file", type=["pdf","txt"])

Expand All @@ -15,6 +16,7 @@
with tempfile.NamedTemporaryFile(delete=False, suffix=os.path.splitext(uploaded_file.name)[1]) as tmp:
tmp.write(uploaded_file.read())
file_path = tmp.name
st.write(f'Created temporary file {file_path}')

docs = ingest(file_path)
metadata = generate_metadata(docs)
Expand Down

0 comments on commit 80d18e0

Please sign in to comment.