Spaces:
Runtime error
Runtime error
File size: 586 Bytes
12c89e3 0f104d5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import docx2txt
import streamlit as st
from io import StringIO
from PyPDF2 import PdfFileReader
def read_pdf(file):
pdfReader = PdfFileReader(file)
count = pdfReader.numPages
all_page_text = ""
for i in range(count):
page = pdfReader.getPage(i)
all_page_text += page.extractText()
return all_page_text
if __name__ == "__main__":
st.header("Testing file uploads")
uploaded_file = st.file_uploader("Upload a file here")
st.markdown(
"<h3 style='text-align: center; color: red;'>OR</h3>",
unsafe_allow_html=True,
)
|