sarim commited on
Commit
555d2a8
·
1 Parent(s): 5b33160
Files changed (2) hide show
  1. app.py +6 -3
  2. requirements.txt +2 -1
app.py CHANGED
@@ -1,12 +1,15 @@
1
  import streamlit as st
2
  from streamlit_pdf_reader import pdf_reader
 
3
 
4
 
5
 
6
- uploaded_file = st.file_uploader('Choose your .pdf file', type="pdf")
7
 
8
- if uploaded_file is not None:
9
- print(uploaded_file.raw)
 
 
10
 
11
  x = st.slider('Select a value')
12
  url_1 = st.text_input(label="Enter research paper url",key="url_1")
 
1
  import streamlit as st
2
  from streamlit_pdf_reader import pdf_reader
3
+ import pdfplumber
4
 
5
 
6
 
7
+ uploaded_files = st.file_uploader('Choose your .pdf file')
8
 
9
+ if uploaded_files is not None:
10
+ # To read file as bytes:
11
+ bytes_data = uploaded_files.read()
12
+ st.write(bytes_data)
13
 
14
  x = st.slider('Select a value')
15
  url_1 = st.text_input(label="Enter research paper url",key="url_1")
requirements.txt CHANGED
@@ -1,2 +1,3 @@
1
  streamlit
2
- streamlit_pdf_reader
 
 
1
  streamlit
2
+ streamlit_pdf_reader
3
+ pdfplumber