Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,9 +5,7 @@ from PyPDF2 import PdfReader
|
|
5 |
|
6 |
st.image('OIG3 (4).jpeg', caption='Your host on this PDF-to-Speech adventure!')
|
7 |
|
8 |
-
x = st.slider('Select a
|
9 |
-
slider_reply = x, 'squared is', x * x
|
10 |
-
st.write(slider_reply)
|
11 |
|
12 |
uploaded_file = st.file_uploader("Choose a file", "pdf")
|
13 |
if uploaded_file is not None:
|
@@ -18,7 +16,7 @@ if uploaded_file is not None:
|
|
18 |
print(X)
|
19 |
|
20 |
i = 0
|
21 |
-
while i <= X:
|
22 |
# getting a specific page from the pdf file
|
23 |
page = reader.pages[i]
|
24 |
# extracting text from page
|
|
|
5 |
|
6 |
st.image('OIG3 (4).jpeg', caption='Your host on this PDF-to-Speech adventure!')
|
7 |
|
8 |
+
x = st.slider('Select a number of pages to transcribe')
|
|
|
|
|
9 |
|
10 |
uploaded_file = st.file_uploader("Choose a file", "pdf")
|
11 |
if uploaded_file is not None:
|
|
|
16 |
print(X)
|
17 |
|
18 |
i = 0
|
19 |
+
while i <= X and i <= x:
|
20 |
# getting a specific page from the pdf file
|
21 |
page = reader.pages[i]
|
22 |
# extracting text from page
|