Spaces:
Runtime error
Runtime error
upd
Browse files
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
title: Text Summarizer
|
3 |
emoji: π
|
4 |
colorFrom: blue
|
5 |
colorTo: yellow
|
|
|
1 |
---
|
2 |
+
title: Text Summarizer
|
3 |
emoji: π
|
4 |
colorFrom: blue
|
5 |
colorTo: yellow
|
test.py
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
import docx2txt
|
2 |
-
import streamlit as st
|
3 |
-
from io import StringIO
|
4 |
-
from PyPDF2 import PdfFileReader
|
5 |
-
|
6 |
-
|
7 |
-
def read_pdf(file):
|
8 |
-
pdfReader = PdfFileReader(file)
|
9 |
-
count = pdfReader.numPages
|
10 |
-
all_page_text = ""
|
11 |
-
for i in range(count):
|
12 |
-
page = pdfReader.getPage(i)
|
13 |
-
all_page_text += page.extractText()
|
14 |
-
|
15 |
-
return all_page_text
|
16 |
-
|
17 |
-
|
18 |
-
if __name__ == "__main__":
|
19 |
-
st.header("Testing file uploads")
|
20 |
-
|
21 |
-
uploaded_file = st.file_uploader("Upload a file here")
|
22 |
-
st.markdown(
|
23 |
-
"<h3 style='text-align: center; color: red;'>OR</h3>",
|
24 |
-
unsafe_allow_html=True,
|
25 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|